1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:37:44 +00:00

Playground: Show placeholders for unregistered widgets

With this, Playground can be used to interactively edit e.g.
DisplaySettingsWindow.gml.
This commit is contained in:
Nico Weber 2021-01-11 14:01:15 -05:00 committed by Andreas Kling
parent 1b2364846f
commit 009c753a12
3 changed files with 56 additions and 11 deletions

View file

@ -298,6 +298,7 @@ public:
void set_override_cursor(Gfx::StandardCursor);
bool load_from_gml(const StringView&);
bool load_from_gml(const StringView&, RefPtr<Widget> (*unregistered_child_handler)(const String&));
void set_shrink_to_fit(bool);
bool is_shrink_to_fit() const { return m_shrink_to_fit; }
@ -350,7 +351,7 @@ private:
void focus_previous_widget(FocusSource, bool siblings_only);
void focus_next_widget(FocusSource, bool siblings_only);
bool load_from_json(const JsonObject&);
bool load_from_json(const JsonObject&, RefPtr<Widget> (*unregistered_child_handler)(const String&));
// HACK: These are used as property getters for the fixed_* size property aliases.
int dummy_fixed_width() { return 0; }