LibGUI: Use new layout system for basic widgets

This commit is contained in:
FrHun 2022-02-22 20:25:30 +01:00 committed by Sam Atkins
commit 19fac58e49
Notes: sideshowbarker 2024-07-17 11:29:41 +09:00
17 changed files with 85 additions and 18 deletions

View file

@ -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();
}
}