1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:47:44 +00:00

VisualBuilder: Add a table view with the selected widget's properties.

This commit is contained in:
Andreas Kling 2019-04-11 21:41:09 +02:00
parent c57cf9834b
commit 707bfe848d
11 changed files with 113 additions and 6 deletions

View file

@ -74,13 +74,13 @@ static GWidget* build_gwidget(VBWidgetType type, GWidget* parent)
}
GWidget* VBWidgetRegistry::build_gwidget(VBWidgetType type, GWidget* parent, HashMap<String, OwnPtr<VBProperty>>& properties)
GWidget* VBWidgetRegistry::build_gwidget(VBWidgetType type, GWidget* parent, Vector<OwnPtr<VBProperty>>& properties)
{
auto* gwidget = ::build_gwidget(type, parent);
auto add_property = [&properties] (const String& name, const GVariant& value, bool is_readonly) {
auto property = make<VBProperty>(name, value);
property->set_readonly(is_readonly);
properties.set(name, move(property));
properties.append(move(property));
};
add_property("ClassName", to_class_name(type), true);
return gwidget;