mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 10:41:30 +00:00
VisualBuilder: Avoid unnecessary lambda
This commit is contained in:
parent
c587db387c
commit
1a0c11cea2
Notes:
sideshowbarker
2024-07-19 03:00:33 +09:00
Author: https://github.com/BenWiederhake
Commit: 1a0c11cea2
Pull-request: https://github.com/SerenityOS/serenity/pull/3343
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/tomuta
1 changed files with 3 additions and 6 deletions
|
@ -154,11 +154,8 @@ static RefPtr<GUI::Widget> build_gwidget(VBWidgetType type, GUI::Widget* parent)
|
|||
RefPtr<GUI::Widget> VBWidgetRegistry::build_gwidget(VBWidget& widget, VBWidgetType type, GUI::Widget* parent, NonnullOwnPtrVector<VBProperty>& properties)
|
||||
{
|
||||
auto gwidget = ::build_gwidget(type, parent);
|
||||
auto add_readonly_property = [&](const String& name, const GUI::Variant& value) {
|
||||
auto property = make<VBProperty>(widget, name, value);
|
||||
auto property = make<VBProperty>(widget, "class", to_class_name(type));
|
||||
property->set_readonly(true);
|
||||
properties.append(move(property));
|
||||
};
|
||||
add_readonly_property("class", to_class_name(type));
|
||||
return gwidget;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue