1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 23:47:45 +00:00

LibGUI: Add GLazyWidget, a convenience widget for lazily-built UI's

Here's how you can use this to speed up startup time:

    auto widget = GLazyWidget::construct();
    widget->on_first_show = [](auto& self) {
        self.set_layout(...);
        ...
    };

Basically, it allows you to delay building the widget subtree until
it's shown for the first time.
This commit is contained in:
Andreas Kling 2019-10-02 20:24:29 +02:00
parent 7e2b9c3c40
commit 183f7c9830
3 changed files with 40 additions and 0 deletions

View file

@ -55,6 +55,7 @@ OBJS = \
GJsonArrayModel.o \
GAboutDialog.o \
GModelSelection.o \
GLazyWidget.o \
GWindow.o
LIBRARY = libgui.a