mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibGUI: Use new layout system for basic widgets
This commit is contained in:
parent
bfbaad9f41
commit
19fac58e49
Notes:
sideshowbarker
2024-07-17 11:29:41 +09:00
Author: https://github.com/frhun
Commit: 19fac58e49
Pull-request: https://github.com/SerenityOS/serenity/pull/14261
Reviewed-by: https://github.com/AtkinsSJ ✅
Reviewed-by: https://github.com/MacDue
Reviewed-by: https://github.com/mjz19910
17 changed files with 85 additions and 18 deletions
|
@ -133,4 +133,13 @@ void Toolbar::paint_event(PaintEvent& event)
|
|||
painter.fill_rect(event.rect(), palette().button());
|
||||
}
|
||||
|
||||
Optional<UISize> Toolbar::calculated_preferred_size() const
|
||||
{
|
||||
if (m_orientation == Gfx::Orientation::Horizontal)
|
||||
return { { SpecialDimension::Grow, SpecialDimension::Fit } };
|
||||
else
|
||||
return { { SpecialDimension::Fit, SpecialDimension::Grow } };
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue