summaryrefslogtreecommitdiff
path: root/LibGUI
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-05-07 17:00:56 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-05-07 17:00:56 +0200
commit4f77b4e5bce8bdeca9f33091531ad2db19832ea9 (patch)
tree7b74be2e8fd9111705f0cf92e0158889c3aebf40 /LibGUI
parent1af9b6f10226314080e886ceec69e7ce82e673e5 (diff)
downloadserenity-4f77b4e5bce8bdeca9f33091531ad2db19832ea9.zip
GTabWidget: Fill the entire tab widget instead of just the bar.
There's no guarantee that child widgets will paint everything, so let's have GTabWidget fill itself.
Diffstat (limited to 'LibGUI')
-rw-r--r--LibGUI/GTabWidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/LibGUI/GTabWidget.cpp b/LibGUI/GTabWidget.cpp
index c404e70c5e..2fb1ffbeb7 100644
--- a/LibGUI/GTabWidget.cpp
+++ b/LibGUI/GTabWidget.cpp
@@ -6,6 +6,8 @@
GTabWidget::GTabWidget(GWidget* parent)
: GWidget(parent)
{
+ set_fill_with_background_color(true);
+ set_background_color(Color::LightGray);
}
GTabWidget::~GTabWidget()
@@ -81,8 +83,6 @@ void GTabWidget::paint_event(GPaintEvent& event)
GPainter painter(*this);
painter.add_clip_rect(event.rect());
- painter.fill_rect(bar_rect(), Color::LightGray);
-
Rect container_rect { 0, bar_height(), width(), height() - bar_height() };
auto padding_rect = container_rect;
for (int i = 0; i < container_padding(); ++i) {