summaryrefslogtreecommitdiff
path: root/LibGUI/GToolBar.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-04 10:47:54 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-03-04 10:47:54 +0100
commit4ea7a51ecdd1913698cb80f911301a3633f57781 (patch)
tree637f41ab3a2f752cfe9e8a6a87bb9945e3592caa /LibGUI/GToolBar.cpp
parentac2a3f7fdf270f771b61a546f6b67ab026971413 (diff)
downloadserenity-4ea7a51ecdd1913698cb80f911301a3633f57781.zip
LibGUI: Improve GStatusBar and GToolBar and share some code via GStyle.
Diffstat (limited to 'LibGUI/GToolBar.cpp')
-rw-r--r--LibGUI/GToolBar.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/LibGUI/GToolBar.cpp b/LibGUI/GToolBar.cpp
index e8d6365493..b0de614c33 100644
--- a/LibGUI/GToolBar.cpp
+++ b/LibGUI/GToolBar.cpp
@@ -11,7 +11,7 @@ GToolBar::GToolBar(GWidget* parent)
set_preferred_size({ 0, 30 });
set_layout(make<GBoxLayout>(Orientation::Horizontal));
layout()->set_spacing(0);
- layout()->set_margins({ 2, 2, 2, 2 });
+ layout()->set_margins({ 3, 3, 3, 3 });
}
GToolBar::~GToolBar()
@@ -36,7 +36,7 @@ void GToolBar::add_action(Retained<GAction>&& action)
button->set_button_style(GButtonStyle::CoolBar);
button->set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed);
- button->set_preferred_size({ 26, 26 });
+ button->set_preferred_size({ 24, 24 });
m_items.append(move(item));
}
@@ -52,7 +52,5 @@ void GToolBar::paint_event(GPaintEvent& event)
{
Painter painter(*this);
painter.set_clip_rect(event.rect());
- painter.fill_rect({ 0, 0, width(), height() - 1 }, Color::LightGray);
- painter.draw_line({ 0, 0 }, { width() - 1, 0 }, Color::White);
- painter.draw_line({ 0, rect().bottom() }, { width() - 1, rect().bottom() }, Color::DarkGray);
+ GStyle::the().paint_surface(painter, rect());
}