From 4f77b4e5bce8bdeca9f33091531ad2db19832ea9 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 7 May 2019 17:00:56 +0200 Subject: 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. --- LibGUI/GTabWidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'LibGUI') 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) { -- cgit v1.2.3