LibGUI: Fix highlighting of elements in TreeView

Previously, incorrect items were highlighted when hovering over
elements in TreeView when there was a column header.
This commit is contained in:
martinfalisse 2023-01-03 10:53:04 +01:00 committed by Sam Atkins
commit 481c0419ba
Notes: sideshowbarker 2024-07-17 05:18:58 +09:00

View file

@ -775,6 +775,7 @@ Gfx::IntRect TreeView::content_rect(ModelIndex const& index) const
traverse_in_paint_order([&](ModelIndex const& current_index, Gfx::IntRect const& rect, Gfx::IntRect const&, int) {
if (index == current_index) {
found_rect = rect;
found_rect.translate_by(0, column_header().height());
return IterationDecision::Break;
}
return IterationDecision::Continue;