mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:27:35 +00:00
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.
This commit is contained in:
parent
1af9b6f102
commit
4f77b4e5bc
1 changed files with 2 additions and 2 deletions
|
@ -6,6 +6,8 @@
|
||||||
GTabWidget::GTabWidget(GWidget* parent)
|
GTabWidget::GTabWidget(GWidget* parent)
|
||||||
: GWidget(parent)
|
: GWidget(parent)
|
||||||
{
|
{
|
||||||
|
set_fill_with_background_color(true);
|
||||||
|
set_background_color(Color::LightGray);
|
||||||
}
|
}
|
||||||
|
|
||||||
GTabWidget::~GTabWidget()
|
GTabWidget::~GTabWidget()
|
||||||
|
@ -81,8 +83,6 @@ void GTabWidget::paint_event(GPaintEvent& event)
|
||||||
GPainter painter(*this);
|
GPainter painter(*this);
|
||||||
painter.add_clip_rect(event.rect());
|
painter.add_clip_rect(event.rect());
|
||||||
|
|
||||||
painter.fill_rect(bar_rect(), Color::LightGray);
|
|
||||||
|
|
||||||
Rect container_rect { 0, bar_height(), width(), height() - bar_height() };
|
Rect container_rect { 0, bar_height(), width(), height() - bar_height() };
|
||||||
auto padding_rect = container_rect;
|
auto padding_rect = container_rect;
|
||||||
for (int i = 0; i < container_padding(); ++i) {
|
for (int i = 0; i < container_padding(); ++i) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue