summaryrefslogtreecommitdiff
path: root/Applications/QuickShow
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-23 17:44:49 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-23 17:44:49 +0200
commitab336e895f1a56b43098d115195ab5747a6846d2 (patch)
treec6dce34c4a503454a9be128e2612896e141437c4 /Applications/QuickShow
parent5b6c2f3bd6b109dcb243223e6a1df61d478d4fb9 (diff)
downloadserenity-ab336e895f1a56b43098d115195ab5747a6846d2.zip
LibGUI: Add a ToolBarContainer widget and put most ToolBars in one
This mimics the Explorer toolbar container from Windows 2000 and looks pretty neat! :^)
Diffstat (limited to 'Applications/QuickShow')
-rw-r--r--Applications/QuickShow/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Applications/QuickShow/main.cpp b/Applications/QuickShow/main.cpp
index a60421e319..dd234ee14e 100644
--- a/Applications/QuickShow/main.cpp
+++ b/Applications/QuickShow/main.cpp
@@ -38,6 +38,7 @@
#include <LibGUI/MenuBar.h>
#include <LibGUI/MessageBox.h>
#include <LibGUI/ToolBar.h>
+#include <LibGUI/ToolBarContainer.h>
#include <LibGUI/Window.h>
#include <LibGfx/Bitmap.h>
#include <stdio.h>
@@ -71,7 +72,8 @@ int main(int argc, char** argv)
root_widget.set_layout<GUI::VerticalBoxLayout>();
root_widget.layout()->set_spacing(0);
- auto& main_toolbar = root_widget.add<GUI::ToolBar>();
+ auto& toolbar_container = root_widget.add<GUI::ToolBarContainer>();
+ auto& main_toolbar = toolbar_container.add<GUI::ToolBar>();
auto& widget = root_widget.add<QSWidget>();
widget.on_scale_change = [&](int scale) {