mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 17:52:26 -05:00
GTabWidget: Tweak appearance.
This commit is contained in:
parent
5c4b421d56
commit
11b99dd89a
Notes:
sideshowbarker
2024-07-19 14:12:39 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/11b99dd89ac
2 changed files with 3 additions and 3 deletions
|
@ -98,7 +98,7 @@ void GTabWidget::paint_event(GPaintEvent& event)
|
|||
bool hovered = i == m_hovered_tab_index;
|
||||
auto button_rect = this->button_rect(i);
|
||||
StylePainter::paint_tab_button(painter, button_rect, false, hovered, m_tabs[i].widget->is_enabled());
|
||||
painter.draw_text(button_rect, m_tabs[i].title, TextAlignment::Center);
|
||||
painter.draw_text(button_rect.translated(0, 1), m_tabs[i].title, TextAlignment::Center);
|
||||
}
|
||||
|
||||
for (int i = 0; i < m_tabs.size(); ++i) {
|
||||
|
@ -107,7 +107,7 @@ void GTabWidget::paint_event(GPaintEvent& event)
|
|||
bool hovered = i == m_hovered_tab_index;
|
||||
auto button_rect = this->button_rect(i);
|
||||
StylePainter::paint_tab_button(painter, button_rect, true, hovered, m_tabs[i].widget->is_enabled());
|
||||
painter.draw_text(button_rect, m_tabs[i].title, TextAlignment::Center);
|
||||
painter.draw_text(button_rect.translated(0, 1), m_tabs[i].title, TextAlignment::Center);
|
||||
painter.draw_line(button_rect.bottom_left().translated(1, 1), button_rect.bottom_right().translated(-1, 1), background_color());
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ public:
|
|||
GWidget* active_widget() const { return m_active_widget; }
|
||||
void set_active_widget(GWidget*);
|
||||
|
||||
int bar_height() const { return 22; }
|
||||
int bar_height() const { return 21; }
|
||||
int container_padding() const { return 2; }
|
||||
|
||||
void add_widget(const String&, GWidget*);
|
||||
|
|
Loading…
Add table
Reference in a new issue