summaryrefslogtreecommitdiff
path: root/LibGUI/GTableView.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-04 10:12:09 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-03-04 10:12:09 +0100
commitef4d51742964b56abb467bc7b9c59f9a8e28ad7c (patch)
tree5d9a9069f893615158f4649f5d78930e749e6a90 /LibGUI/GTableView.cpp
parent5c27e74fac54cbaffad781affb54bd8821c66458 (diff)
downloadserenity-ef4d51742964b56abb467bc7b9c59f9a8e28ad7c.zip
LibGUI: Tweak focus appearance and add it to GTableView.
Diffstat (limited to 'LibGUI/GTableView.cpp')
-rw-r--r--LibGUI/GTableView.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/LibGUI/GTableView.cpp b/LibGUI/GTableView.cpp
index b6adb3b09c..883a818b45 100644
--- a/LibGUI/GTableView.cpp
+++ b/LibGUI/GTableView.cpp
@@ -163,6 +163,16 @@ void GTableView::paint_event(GPaintEvent& event)
// Then untranslate and fill in the scroll corner. This is pretty messy, tbh.
painter.translate(m_horizontal_scrollbar->value(), 0);
painter.fill_rect({ m_horizontal_scrollbar->relative_rect().top_right().translated(1, 0), { m_vertical_scrollbar->preferred_size().width(), m_horizontal_scrollbar->preferred_size().height() } }, Color::LightGray);
+
+ if (is_focused()) {
+ Rect item_area_rect {
+ 0,
+ header_height(),
+ width() - m_vertical_scrollbar->width(),
+ height() - header_height() - m_horizontal_scrollbar->height()
+ };
+ painter.draw_rect(item_area_rect, Color::from_rgb(0x84351a));
+ };
}
int GTableView::item_count() const