summaryrefslogtreecommitdiff
path: root/Applications/TextEditor
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/TextEditor
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/TextEditor')
-rw-r--r--Applications/TextEditor/TextEditorWidget.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/Applications/TextEditor/TextEditorWidget.cpp b/Applications/TextEditor/TextEditorWidget.cpp
index 994b13f703..afb27ea441 100644
--- a/Applications/TextEditor/TextEditorWidget.cpp
+++ b/Applications/TextEditor/TextEditorWidget.cpp
@@ -46,15 +46,18 @@
#include <LibGUI/TextBox.h>
#include <LibGUI/TextEditor.h>
#include <LibGUI/ToolBar.h>
+#include <LibGUI/ToolBarContainer.h>
#include <LibGfx/Font.h>
#include <string.h>
TextEditorWidget::TextEditorWidget()
{
+ set_fill_with_background_color(true);
set_layout<GUI::VerticalBoxLayout>();
- layout()->set_spacing(0);
+ layout()->set_spacing(2);
- auto& toolbar = add<GUI::ToolBar>();
+ auto& toolbar_container = add<GUI::ToolBarContainer>();
+ auto& toolbar = toolbar_container.add<GUI::ToolBar>();
m_editor = add<GUI::TextEditor>();
m_editor->set_ruler_visible(true);
m_editor->set_automatic_indentation_enabled(true);