1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:57:35 +00:00

LibGUI: Add a GStackWidget for many widgets sharing a single location.

Call set_active_widget(GWidget*) to put a new widget on top.
This commit is contained in:
Andreas Kling 2019-03-15 16:12:06 +01:00
parent ab92252ee6
commit 497300c492
10 changed files with 157 additions and 5 deletions

View file

@ -122,7 +122,12 @@ public:
void notify_layout_changed(Badge<GLayout>);
bool is_visible() const { return m_visible; }
void set_visible(bool);
private:
virtual bool is_widget() const final { return true; }
void handle_paint_event(GPaintEvent&);
void handle_resize_event(GResizeEvent&);
void do_layout();
@ -141,4 +146,5 @@ private:
Size m_preferred_size;
bool m_fill_with_background_color { false };
bool m_visible { true };
};