mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:27:43 +00:00
VisualBuilder: Avoid unnecessary lambda
This commit is contained in:
parent
c587db387c
commit
1a0c11cea2
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)
|
RefPtr<GUI::Widget> VBWidgetRegistry::build_gwidget(VBWidget& widget, VBWidgetType type, GUI::Widget* parent, NonnullOwnPtrVector<VBProperty>& properties)
|
||||||
{
|
{
|
||||||
auto gwidget = ::build_gwidget(type, parent);
|
auto gwidget = ::build_gwidget(type, parent);
|
||||||
auto add_readonly_property = [&](const String& name, const GUI::Variant& value) {
|
auto property = make<VBProperty>(widget, "class", to_class_name(type));
|
||||||
auto property = make<VBProperty>(widget, name, value);
|
property->set_readonly(true);
|
||||||
property->set_readonly(true);
|
properties.append(move(property));
|
||||||
properties.append(move(property));
|
|
||||||
};
|
|
||||||
add_readonly_property("class", to_class_name(type));
|
|
||||||
return gwidget;
|
return gwidget;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue