mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:47:44 +00:00
LibGUI: Use new layout system for basic widgets
This commit is contained in:
parent
bfbaad9f41
commit
19fac58e49
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