summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-10-27 16:20:20 +0100
committerAndreas Kling <kling@serenityos.org>2020-10-27 16:20:20 +0100
commitf7d8174bee83d3c1ebb128260a237c802c422bac (patch)
tree99a2eebeaf2968c86edb6f9458c77de28b82782e /Libraries
parentc0076681adc43873cd148f09277e57603479eb85 (diff)
downloadserenity-f7d8174bee83d3c1ebb128260a237c802c422bac.zip
LibGUI: Paint a focus rect around the cursor index in ColumnsView
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibGUI/ColumnsView.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Libraries/LibGUI/ColumnsView.cpp b/Libraries/LibGUI/ColumnsView.cpp
index 4f26b35b6c..169a29b811 100644
--- a/Libraries/LibGUI/ColumnsView.cpp
+++ b/Libraries/LibGUI/ColumnsView.cpp
@@ -147,6 +147,11 @@ void ColumnsView::paint_event(PaintEvent& event)
};
draw_item_text(painter, index, is_selected_row, text_rect, index.data().to_string(), font_for_index(index), Gfx::TextAlignment::CenterLeft, Gfx::TextElision::None);
+ if (is_focused() && index == cursor_index()) {
+ painter.draw_rect(row_rect, palette().color(background_role()));
+ painter.draw_focus_rect(row_rect, palette().focus_outline());
+ }
+
bool expandable = model()->row_count(index) > 0;
if (expandable) {
Gfx::IntRect arrow_rect = {