diff options
author | Andreas Kling <kling@serenityos.org> | 2020-04-23 17:44:49 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-23 17:44:49 +0200 |
commit | ab336e895f1a56b43098d115195ab5747a6846d2 (patch) | |
tree | c6dce34c4a503454a9be128e2612896e141437c4 /Applications/Browser | |
parent | 5b6c2f3bd6b109dcb243223e6a1df61d478d4fb9 (diff) | |
download | serenity-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/Browser')
-rw-r--r-- | Applications/Browser/main.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Applications/Browser/main.cpp b/Applications/Browser/main.cpp index 1ed5d03d3b..0bf63bb9b4 100644 --- a/Applications/Browser/main.cpp +++ b/Applications/Browser/main.cpp @@ -38,6 +38,7 @@ #include <LibGUI/StatusBar.h> #include <LibGUI/TextBox.h> #include <LibGUI/ToolBar.h> +#include <LibGUI/ToolBarContainer.h> #include <LibGUI/Window.h> #include <LibWeb/CSS/StyleResolver.h> #include <LibWeb/DOM/Element.h> @@ -104,8 +105,9 @@ int main(int argc, char** argv) bool bookmarksbar_enabled = true; - auto& toolbar = widget.add<GUI::ToolBar>(); - auto& bookmarksbar = widget.add<BookmarksBarWidget>(bookmarks_filename, bookmarksbar_enabled); + auto& toolbar_container = widget.add<GUI::ToolBarContainer>(); + auto& toolbar = toolbar_container.add<GUI::ToolBar>(); + auto& bookmarksbar = toolbar_container.add<BookmarksBarWidget>(bookmarks_filename, bookmarksbar_enabled); auto& html_widget = widget.add<Web::HtmlView>(); bookmarksbar.on_bookmark_click = [&](auto&, auto& url) { |