LibGUI: Implement calculated_min_size() for StackWidget

This commit is contained in:
thankyouverycool 2022-09-22 11:22:53 -04:00 committed by Andreas Kling
parent f0a5ce6d11
commit cbd9cf93be
Notes: sideshowbarker 2024-07-17 06:39:30 +09:00
2 changed files with 7 additions and 0 deletions

View file

@ -66,4 +66,9 @@ void StackWidget::child_event(Core::ChildEvent& event)
Widget::child_event(event); Widget::child_event(event);
} }
Optional<UISize> StackWidget::calculated_min_size() const
{
return m_active_widget->calculated_min_size();
}
} }

View file

@ -22,6 +22,8 @@ public:
Function<void(Widget*)> on_active_widget_change; Function<void(Widget*)> on_active_widget_change;
virtual Optional<UISize> calculated_min_size() const override;
protected: protected:
StackWidget() = default; StackWidget() = default;
virtual void child_event(Core::ChildEvent&) override; virtual void child_event(Core::ChildEvent&) override;