From 2310aabdb91e3bc313127755051fbb6913e0fde7 Mon Sep 17 00:00:00 2001 From: airkjw Date: Sun, 14 Jun 2026 09:02:01 +0900 Subject: [PATCH] fix(ui): move game-screen close button to its own top row (was overlapping HUD) On device the floating top-left X (48px IconButton) overlapped the HUD moves chip. Move it into the column flow above the HUD, left-aligned, so it never collides. Found via on-device test build. --- lib/ui/screens/game_screen.dart | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/ui/screens/game_screen.dart b/lib/ui/screens/game_screen.dart index dfa157f..a66b650 100644 --- a/lib/ui/screens/game_screen.dart +++ b/lib/ui/screens/game_screen.dart @@ -256,6 +256,18 @@ class _GameScreenState extends ConsumerState padding: const EdgeInsets.all(16), child: Column( children: [ + // Close/back sits on its own top row so it never overlaps + // the HUD's moves chip (which lives at the top-left). + if (Navigator.of(context).canPop()) + Align( + alignment: Alignment.centerLeft, + child: IconButton( + padding: EdgeInsets.zero, + visualDensity: VisualDensity.compact, + icon: const Icon(Icons.close, color: Colors.white54), + onPressed: () => Navigator.of(context).pop(), + ), + ), HudWidget(view: view), Expanded( child: Center( @@ -308,15 +320,6 @@ class _GameScreenState extends ConsumerState ref.read(tutorialProvider.notifier).dismissHud(), ), ), - if (Navigator.of(context).canPop()) - Positioned( - top: 4, - left: 4, - child: IconButton( - icon: const Icon(Icons.close, color: Colors.white54), - onPressed: () => Navigator.of(context).pop(), - ), - ), ], ), ),