From 11b99dd89acdb19ecbe2e6c998dd9637c1a149a0 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 7 May 2019 14:13:20 +0200 Subject: [PATCH] GTabWidget: Tweak appearance. --- LibGUI/GTabWidget.cpp | 4 ++-- LibGUI/GTabWidget.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LibGUI/GTabWidget.cpp b/LibGUI/GTabWidget.cpp index be7351a0f35..c404e70c5ee 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 6b09ed5927d..7452c81da86 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*);