1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:28:12 +00:00

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
parent 4c7a99fe06
commit 481c0419ba

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;