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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user