aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Body.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Body.cpp b/src/Body.cpp
index 505db2b..7050d7d 100644
--- a/src/Body.cpp
+++ b/src/Body.cpp
@@ -1202,6 +1202,11 @@ namespace QuickMedia {
}
}
+ // TODO: This is a temporary workaround for page getting scrolled when the first item can be visible while also showing
+ // the selected item. This should be replaced with a proper solution once the rendering code has been rewritten.
+ if(attach_side == AttachSide::TOP && pos.y + std::abs(page_scroll) < size.y)
+ page_scroll = 0.0;
+
for(RenderItem &render_item : render_items) {
if(render_item.item_index == selected_item) {
float offset_y_spacing = -body_spacing[body_theme].spacing_y;