diff options
author | AmusedNetwork <joseph@bywater.xyz> | 2020-11-11 13:33:51 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-11 15:14:09 +0100 |
commit | de6483bcdb250b9a22ef3948e4f562e5328608ff (patch) | |
tree | 6ce28cb1e096d80535b10cde4881bdb07011760f /Libraries/LibGUI/IconView.cpp | |
parent | dc9ddf8104d79d4a939cca4fc65dc88271907539 (diff) | |
download | serenity-de6483bcdb250b9a22ef3948e4f562e5328608ff.zip |
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
Diffstat (limited to 'Libraries/LibGUI/IconView.cpp')
-rw-r--r-- | Libraries/LibGUI/IconView.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibGUI/IconView.cpp b/Libraries/LibGUI/IconView.cpp index c116520697..5b5b3f8bf1 100644 --- a/Libraries/LibGUI/IconView.cpp +++ b/Libraries/LibGUI/IconView.cpp @@ -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); |