LibGUI: Draw a focus rect over the row when sel. behavior is SelectRows

This commit is contained in:
sin-ack 2021-08-10 00:51:17 +00:00 committed by Andreas Kling
parent b6ef12bd26
commit 309a20c014
Notes: sideshowbarker 2024-07-18 07:08:47 +09:00

View file

@ -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;
});
}