ui: fix PAGE_UP/PAGE_DOWN crash — use self._layout.page_size not theme.PAGE_SIZE

This commit is contained in:
Matteo Benedetto
2026-03-23 23:55:47 +01:00
parent 6715f4b227
commit 9b8ddb3a05
+2 -2
View File
@@ -341,11 +341,11 @@ class SDLApp:
self._adjust_browse_scroll()
self._mark_dirty()
elif action == Action.PAGE_UP and n:
self._state.cursor = max(0, self._state.cursor - theme.PAGE_SIZE)
self._state.cursor = max(0, self._state.cursor - self._layout.page_size)
self._adjust_browse_scroll()
self._mark_dirty()
elif action == Action.PAGE_DOWN and n:
self._state.cursor = min(n - 1, self._state.cursor + theme.PAGE_SIZE)
self._state.cursor = min(n - 1, self._state.cursor + self._layout.page_size)
self._adjust_browse_scroll()
self._mark_dirty()
elif action == Action.CONFIRM: