summaryrefslogtreecommitdiff
path: root/LibGUI
diff options
context:
space:
mode:
Diffstat (limited to 'LibGUI')
-rw-r--r--LibGUI/GToolBar.cpp6
-rw-r--r--LibGUI/GToolBar.h4
2 files changed, 9 insertions, 1 deletions
diff --git a/LibGUI/GToolBar.cpp b/LibGUI/GToolBar.cpp
index 18253d7233..00a18e45e4 100644
--- a/LibGUI/GToolBar.cpp
+++ b/LibGUI/GToolBar.cpp
@@ -81,5 +81,9 @@ void GToolBar::paint_event(GPaintEvent& event)
{
GPainter painter(*this);
painter.add_clip_rect(event.rect());
- StylePainter::paint_surface(painter, rect(), x() != 0, y() != 0);
+
+ if (m_has_frame)
+ StylePainter::paint_surface(painter, rect(), x() != 0, y() != 0);
+ else
+ painter.fill_rect(event.rect(), Color::LightGray);
}
diff --git a/LibGUI/GToolBar.h b/LibGUI/GToolBar.h
index 6834664498..4660001c1c 100644
--- a/LibGUI/GToolBar.h
+++ b/LibGUI/GToolBar.h
@@ -12,6 +12,9 @@ public:
void add_action(Retained<GAction>&&);
void add_separator();
+ bool has_frame() const { return m_has_frame; }
+ void set_has_frame(bool has_frame) { m_has_frame = has_frame; }
+
virtual const char* class_name() const override { return "GToolBar"; }
private:
@@ -23,4 +26,5 @@ private:
RetainPtr<GAction> action;
};
Vector<OwnPtr<Item>> m_items;
+ bool m_has_frame { true };
};