mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibGUI: Set vertical distance between icons relative to scroll value
When calculating the vertical distance between icons, we should take into account the value of the vertical scrollbar. Fixes #4040
This commit is contained in:
parent
dc9ddf8104
commit
de6483bcdb
Notes:
sideshowbarker
2024-07-19 17:32:08 +09:00
Author: https://github.com/AmusedNetwork Commit: https://github.com/SerenityOS/serenity/commit/de6483bcdb2 Pull-request: https://github.com/SerenityOS/serenity/pull/4045
1 changed files with 1 additions and 1 deletions
|
@ -524,7 +524,7 @@ void IconView::paint_event(PaintEvent& event)
|
|||
auto font = font_for_index(item_data.index);
|
||||
|
||||
Gfx::IntRect text_rect = item_data.text_rect;
|
||||
auto icon_translation = translation.y() - 12;
|
||||
auto icon_translation = translation.y() + vertical_scrollbar().value() - 12;
|
||||
text_rect.set_height(text_rect.height() > icon_translation ? icon_translation : text_rect.height());
|
||||
|
||||
painter.fill_rect(text_rect, background_color);
|
||||
|
|
Loading…
Reference in a new issue