mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-13 10:26:37 +02:00
Userspace: Use Core::Object::add() when building interfaces
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 09:08:47 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/3d20da9ee45
@@ -52,7 +52,7 @@ RefPtr<LayoutNode> HTMLInputElement::create_layout_node(const StyleProperties*)
|
||||
|
||||
RefPtr<GUI::Widget> widget;
|
||||
if (type() == "submit") {
|
||||
auto button = GUI::Button::construct(value(), &html_view);
|
||||
auto button = html_view.add<GUI::Button>(value());
|
||||
int text_width = Gfx::Font::default_font().width(value());
|
||||
button->set_relative_rect(0, 0, text_width + 20, 20);
|
||||
button->on_click = [this](auto&) {
|
||||
|
||||
Reference in New Issue
Block a user