diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-05-07 14:13:20 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-05-07 14:13:20 +0200 |
commit | 11b99dd89acdb19ecbe2e6c998dd9637c1a149a0 (patch) | |
tree | dc8a84a35c52079f01a666f98d54f42dfa4c4486 /LibGUI | |
parent | 5c4b421d561b41a3b3547624700c392bd8d56e5a (diff) | |
download | serenity-11b99dd89acdb19ecbe2e6c998dd9637c1a149a0.zip |
GTabWidget: Tweak appearance.
Diffstat (limited to 'LibGUI')
-rw-r--r-- | LibGUI/GTabWidget.cpp | 4 | ||||
-rw-r--r-- | LibGUI/GTabWidget.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/LibGUI/GTabWidget.cpp b/LibGUI/GTabWidget.cpp index be7351a0f3..c404e70c5e 100644 --- a/LibGUI/GTabWidget.cpp +++ b/LibGUI/GTabWidget.cpp @@ -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; } diff --git a/LibGUI/GTabWidget.h b/LibGUI/GTabWidget.h index 6b09ed5927..7452c81da8 100644 --- a/LibGUI/GTabWidget.h +++ b/LibGUI/GTabWidget.h @@ -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*); |