mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-29 19:10:26 +00:00
LibGUI: Implement calculated_min_size() for StackWidget
This commit is contained in:
parent
f0a5ce6d11
commit
cbd9cf93be
Notes:
sideshowbarker
2024-07-17 06:39:30 +09:00
Author: https://github.com/thankyouverycool Commit: https://github.com/SerenityOS/serenity/commit/cbd9cf93be Pull-request: https://github.com/SerenityOS/serenity/pull/15344
2 changed files with 7 additions and 0 deletions
|
@ -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();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue