From cbd9cf93beb35784341b99b09ad624208e828517 Mon Sep 17 00:00:00 2001 From: thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> Date: Thu, 22 Sep 2022 11:22:53 -0400 Subject: [PATCH] LibGUI: Implement calculated_min_size() for StackWidget --- Userland/Libraries/LibGUI/StackWidget.cpp | 5 +++++ Userland/Libraries/LibGUI/StackWidget.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/Userland/Libraries/LibGUI/StackWidget.cpp b/Userland/Libraries/LibGUI/StackWidget.cpp index a5b6aca5955..5f5643ee6c1 100644 --- a/Userland/Libraries/LibGUI/StackWidget.cpp +++ b/Userland/Libraries/LibGUI/StackWidget.cpp @@ -66,4 +66,9 @@ void StackWidget::child_event(Core::ChildEvent& event) Widget::child_event(event); } +Optional StackWidget::calculated_min_size() const +{ + return m_active_widget->calculated_min_size(); +} + } diff --git a/Userland/Libraries/LibGUI/StackWidget.h b/Userland/Libraries/LibGUI/StackWidget.h index ad57814c2e9..ee606a51690 100644 --- a/Userland/Libraries/LibGUI/StackWidget.h +++ b/Userland/Libraries/LibGUI/StackWidget.h @@ -22,6 +22,8 @@ public: Function on_active_widget_change; + virtual Optional calculated_min_size() const override; + protected: StackWidget() = default; virtual void child_event(Core::ChildEvent&) override;