Fix main menu scroll on mobile: align top and enable overflow

When in vertical layout (narrow screens), align content to top
and enable vertical scrolling so the menu list isn't cut off.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
shuki
2026-03-07 01:15:23 +02:00
parent af150f912d
commit 0ad929a4b6

View File

@@ -70,8 +70,12 @@ class MainMenuScreen(Screen):
logo.display = width >= 48
if width < 100:
layout.styles.layout = "vertical"
layout.styles.align = ("center", "top")
layout.styles.overflow_y = "auto"
else:
layout.styles.layout = "horizontal"
layout.styles.align = ("center", "middle")
layout.styles.overflow_y = "hidden"
def on_option_list_option_selected(self, event: OptionList.OptionSelected) -> None:
option_id = event.option.id