mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-07 19:57:45 +03: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
Notes:
sideshowbarker
2024-07-19 14:12:29 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/4f77b4e5bce
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user