Pārlūkot izejas kodu

Fix menu overflow and move settings to menu items

- Remove settings icon from top right corner in both orientations
- Add settings as a menu button with proper localization
- Wrap menu content in SingleChildScrollView to prevent overflow
- Add settingsDescription translations for all supported languages

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Fszontagh 6 mēneši atpakaļ
vecāks
revīzija
974a43ba93

+ 6 - 0
lib/l10n/app_localizations.dart

@@ -172,6 +172,12 @@ abstract class AppLocalizations {
   /// **'Settings'**
   String get settings;
 
+  /// Description for settings button
+  ///
+  /// In en, this message translates to:
+  /// **'Customize your app experience'**
+  String get settingsDescription;
+
   /// Statistics menu title
   ///
   /// In en, this message translates to:

+ 3 - 0
lib/l10n/app_localizations_de.dart

@@ -46,6 +46,9 @@ class AppLocalizationsDe extends AppLocalizations {
   @override
   String get settings => 'Einstellungen';
 
+  @override
+  String get settingsDescription => 'Passen Sie Ihre App-Erfahrung an';
+
   @override
   String get stats => 'Statistiken';
 

+ 3 - 0
lib/l10n/app_localizations_en.dart

@@ -46,6 +46,9 @@ class AppLocalizationsEn extends AppLocalizations {
   @override
   String get settings => 'Settings';
 
+  @override
+  String get settingsDescription => 'Customize your app experience';
+
   @override
   String get stats => 'Stats';
 

+ 3 - 0
lib/l10n/app_localizations_hu.dart

@@ -46,6 +46,9 @@ class AppLocalizationsHu extends AppLocalizations {
   @override
   String get settings => 'Beállítások';
 
+  @override
+  String get settingsDescription => 'Testreszabja az alkalmazás élményét';
+
   @override
   String get stats => 'Statisztikák';
 

+ 45 - 62
lib/ui/main_menu.dart

@@ -108,38 +108,23 @@ class _MainMenuState extends State<MainMenu> {
   Widget _buildPortraitLayout() {
     return Column(
       children: [
-        // Header with settings button
-        Row(
-          mainAxisAlignment: MainAxisAlignment.end,
-          children: [
-            IconButton(
-              onPressed: _openSettings,
-              icon: Icon(
-                Icons.settings,
-                color: ZenColors.currentPrimaryText,
-                size: 28,
-              ),
-              style: IconButton.styleFrom(
-                backgroundColor: ZenColors.black.withValues(alpha: 0.3),
-                shape: const CircleBorder(),
-              ),
-            ),
-          ],
-        ),
-
         // Main content
         Expanded(
-          child: Column(
-            mainAxisAlignment: MainAxisAlignment.center,
-            children: [
-              _buildGameTitle(),
-              const SizedBox(height: 40),
-              _buildTodayScore(),
-              const SizedBox(height: 40),
-              _buildMenuButtons(),
-              const SizedBox(height: 40),
-              _buildSettingsHint(),
-            ],
+          child: SingleChildScrollView(
+            child: Column(
+              mainAxisAlignment: MainAxisAlignment.center,
+              children: [
+                const SizedBox(height: 20),
+                _buildGameTitle(),
+                const SizedBox(height: 40),
+                _buildTodayScore(),
+                const SizedBox(height: 40),
+                _buildMenuButtons(),
+                const SizedBox(height: 40),
+                _buildSettingsHint(),
+                const SizedBox(height: 20),
+              ],
+            ),
           ),
         ),
       ],
@@ -164,40 +149,18 @@ class _MainMenuState extends State<MainMenu> {
           ),
         ),
 
-        // Right side - Menu buttons and settings
+        // Right side - Menu buttons
         Expanded(
           flex: 3,
-          child: Column(
-            children: [
-              // Settings button
-              Row(
-                mainAxisAlignment: MainAxisAlignment.end,
-                children: [
-                  IconButton(
-                    onPressed: _openSettings,
-                    icon: Icon(
-                      Icons.settings,
-                      color: ZenColors.currentPrimaryText,
-                      size: 28,
-                    ),
-                    style: IconButton.styleFrom(
-                      backgroundColor: ZenColors.black.withValues(alpha: 0.3),
-                      shape: const CircleBorder(),
-                    ),
-                  ),
-                ],
-              ),
-
-              // Menu buttons
-              Expanded(
-                child: SingleChildScrollView(
-                  child: Column(
-                    mainAxisAlignment: MainAxisAlignment.center,
-                    children: [_buildResponsiveMenuButtons()],
-                  ),
-                ),
-              ),
-            ],
+          child: SingleChildScrollView(
+            child: Column(
+              mainAxisAlignment: MainAxisAlignment.center,
+              children: [
+                const SizedBox(height: 20),
+                _buildResponsiveMenuButtons(),
+                const SizedBox(height: 20),
+              ],
+            ),
           ),
         ),
       ],
@@ -288,6 +251,16 @@ class _MainMenuState extends State<MainMenu> {
         ),
         const SizedBox(height: 20),
 
+        // Settings Button
+        _buildMenuButton(
+          context,
+          l10n.settings,
+          l10n.settingsDescription,
+          Icons.settings,
+          _openSettings,
+        ),
+        const SizedBox(height: 20),
+
         // Exit Button
         _buildExitButton(
           context,
@@ -345,6 +318,16 @@ class _MainMenuState extends State<MainMenu> {
             ),
             SizedBox(height: buttonSpacing),
 
+            // Settings Button
+            _buildMenuButton(
+              context,
+              l10n.settings,
+              l10n.settingsDescription,
+              Icons.settings,
+              _openSettings,
+            ),
+            SizedBox(height: buttonSpacing),
+
             // Exit Button
             _buildExitButton(
               context,