summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGUI/Toolbar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibGUI/Toolbar.cpp')
-rw-r--r--Userland/Libraries/LibGUI/Toolbar.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/Toolbar.cpp b/Userland/Libraries/LibGUI/Toolbar.cpp
index fee9db5daa..a52ec010e4 100644
--- a/Userland/Libraries/LibGUI/Toolbar.cpp
+++ b/Userland/Libraries/LibGUI/Toolbar.cpp
@@ -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();
+}
+
}