mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 09:30:24 +00:00
LibGUI: Draw a focus rect over the row when sel. behavior is SelectRows
This commit is contained in:
parent
b6ef12bd26
commit
309a20c014
Notes:
sideshowbarker
2024-07-18 07:08:47 +09:00
Author: https://github.com/sin-ack Commit: https://github.com/SerenityOS/serenity/commit/309a20c0142 Pull-request: https://github.com/SerenityOS/serenity/pull/9323
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue