summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-12-24 02:25:11 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-12-24 02:25:50 +0100
commit7b78f63f854180f48e1859a124a1e97e874c00a3 (patch)
treeeb112db884785652a0169072924478d0efd6a9a9
parent8ae826f5c3ce8755d88199ce67dd9f71f60e2eea (diff)
downloadserenity-7b78f63f854180f48e1859a124a1e97e874c00a3.zip
LibGUI: More system theme support in GTabWidget and GTableView
-rw-r--r--Libraries/LibGUI/GTabWidget.cpp6
-rw-r--r--Libraries/LibGUI/GTableView.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/Libraries/LibGUI/GTabWidget.cpp b/Libraries/LibGUI/GTabWidget.cpp
index 7166d3b454..49f07dc4be 100644
--- a/Libraries/LibGUI/GTabWidget.cpp
+++ b/Libraries/LibGUI/GTabWidget.cpp
@@ -124,7 +124,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.translated(0, 1), m_tabs[i].title, TextAlignment::Center);
+ painter.draw_text(button_rect.translated(0, 1), m_tabs[i].title, TextAlignment::Center, SystemColor::ButtonText);
}
for (int i = 0; i < m_tabs.size(); ++i) {
@@ -133,8 +133,8 @@ 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.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());
+ painter.draw_text(button_rect.translated(0, 1), m_tabs[i].title, TextAlignment::Center, SystemColor::ButtonText);
+ painter.draw_line(button_rect.bottom_left().translated(1, 1), button_rect.bottom_right().translated(-1, 1), SystemColor::Button);
break;
}
}
diff --git a/Libraries/LibGUI/GTableView.cpp b/Libraries/LibGUI/GTableView.cpp
index f98d817e67..f7062589f3 100644
--- a/Libraries/LibGUI/GTableView.cpp
+++ b/Libraries/LibGUI/GTableView.cpp
@@ -57,11 +57,11 @@ void GTableView::paint_event(GPaintEvent& event)
key_column_background_color = is_focused() ? Color::from_rgb(0x84351a) : Color::from_rgb(0x606060);
} else {
if (alternating_row_colors() && (painted_item_index % 2)) {
- background_color = Color(220, 220, 220);
- key_column_background_color = Color(200, 200, 200);
+ background_color = Color(SystemColor::Base).darkened(0.8f);
+ key_column_background_color = Color(SystemColor::Base).darkened(0.7f);
} else {
background_color = SystemColor::Base;
- key_column_background_color = Color(220, 220, 220);
+ key_column_background_color = Color(SystemColor::Base).darkened(0.9f);
}
}
painter.fill_rect(row_rect(painted_item_index), background_color);