diff options
author | sin-ack <sin-ack@users.noreply.github.com> | 2021-08-10 00:51:17 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-08-10 21:56:47 +0200 |
commit | 309a20c014289d33bfdaea5ce438a4bbc90d3c75 (patch) | |
tree | 7e3e406ff4cd8acdbfb9122d08740fd7c8e9b3cc /Userland/Libraries/LibGUI/TreeView.cpp | |
parent | b6ef12bd26385906ee4fdf974fc72c2eb19121c1 (diff) | |
download | serenity-309a20c014289d33bfdaea5ce438a4bbc90d3c75.zip |
LibGUI: Draw a focus rect over the row when sel. behavior is SelectRows
Diffstat (limited to 'Userland/Libraries/LibGUI/TreeView.cpp')
-rw-r--r-- | Userland/Libraries/LibGUI/TreeView.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGUI/TreeView.cpp b/Userland/Libraries/LibGUI/TreeView.cpp index 72bb6a735d..ebe6259684 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; }); } |