mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:58:11 +00:00
LibGUI: Add a ToolBarContainer widget and put most ToolBars in one
This mimics the Explorer toolbar container from Windows 2000 and looks pretty neat! :^)
This commit is contained in:
parent
5b6c2f3bd6
commit
ab336e895f
12 changed files with 179 additions and 18 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue