From 309a20c014289d33bfdaea5ce438a4bbc90d3c75 Mon Sep 17 00:00:00 2001 From: sin-ack Date: Tue, 10 Aug 2021 00:51:17 +0000 Subject: [PATCH] LibGUI: Draw a focus rect over the row when sel. behavior is SelectRows --- Userland/Libraries/LibGUI/TreeView.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Userland/Libraries/LibGUI/TreeView.cpp b/Userland/Libraries/LibGUI/TreeView.cpp index 72bb6a735d2..ebe62596840 100644 --- a/Userland/Libraries/LibGUI/TreeView.cpp +++ b/Userland/Libraries/LibGUI/TreeView.cpp @@ -373,6 +373,11 @@ void TreeView::paint_event(PaintEvent& event) x_offset += column_width + horizontal_padding() * 2; } + if (selection_behavior() == SelectionBehavior::SelectRows && is_focused() && index == cursor_index()) { + painter.draw_rect(row_rect, palette().color(background_role())); + painter.draw_focus_rect(row_rect, palette().focus_outline()); + } + return IterationDecision::Continue; }); }