ui: fix PAGE_UP/PAGE_DOWN crash — use self._layout.page_size not theme.PAGE_SIZE
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user