diff --git a/app/lib/ui/widgets/missions_drones_panel.dart b/app/lib/ui/widgets/missions_drones_panel.dart index 8d157d5..f146ec7 100644 --- a/app/lib/ui/widgets/missions_drones_panel.dart +++ b/app/lib/ui/widgets/missions_drones_panel.dart @@ -36,41 +36,42 @@ class _MissionsDronesPanelState extends ConsumerState { return Material( color: const Color(0xEB080808), child: SafeArea( - child: Column( + // Kein eigener Titel-Header mehr (Doku: analog zum Drone-Status- + // Panel, mehr Platz fuer den Inhalt) - der Schliessen-Knopf + // schwebt stattdessen ueber der Tab-Zeile, die dafuer rechts Platz + // frei laesst (siehe unten), statt eine ganze Zeile fuer + // Titel+Knopf zu opfern. + child: Stack( children: [ - Padding( - padding: const EdgeInsets.fromLTRB(16, 12, 8, 12), - child: Row( - children: [ - const Expanded( - child: Text( - 'Missions & Drones', - style: TextStyle( - color: Colors.white, - fontSize: 20, - fontWeight: FontWeight.w700, - ), - ), - ), - IconButton( - onPressed: () => Navigator.of(context).pop(), - icon: const Icon(Icons.close, color: Colors.white), - ), - ], - ), - ), - Row( + Column( children: [ - _tabButton('Missions', _ManagementTab.missions), - _tabButton('Drones', _ManagementTab.drones), + Padding( + // Rechts Platz fuer den schwebenden Schliessen-Knopf, damit + // "Drones" nicht darunter verschwindet. + padding: const EdgeInsets.only(right: 48), + child: Row( + children: [ + _tabButton('Missions', _ManagementTab.missions), + _tabButton('Drones', _ManagementTab.drones), + ], + ), + ), + const Divider(color: Colors.white24, height: 1), + Expanded( + child: switch (_tab) { + _ManagementTab.missions => _missionsTab(), + _ManagementTab.drones => _dronesTab(), + }, + ), ], ), - const Divider(color: Colors.white24, height: 1), - Expanded( - child: switch (_tab) { - _ManagementTab.missions => _missionsTab(), - _ManagementTab.drones => _dronesTab(), - }, + Positioned( + top: 4, + right: 4, + child: IconButton( + onPressed: () => Navigator.of(context).pop(), + icon: const Icon(Icons.close, color: Colors.white), + ), ), ], ), @@ -84,7 +85,9 @@ class _MissionsDronesPanelState extends ConsumerState { child: InkWell( onTap: () => setState(() => _tab = tab), child: Container( - padding: const EdgeInsets.symmetric(vertical: 10), + // 18 statt vorher 10 (analog Drone-Status-Panel: Tabs wirkten + // seit dem Wegfall der Titelzeile zu gequetscht). + padding: const EdgeInsets.symmetric(vertical: 18), decoration: BoxDecoration( border: Border( bottom: BorderSide(