From d8a0809935a76dcdb7b08688f5b8b269c2b94d7e Mon Sep 17 00:00:00 2001 From: Constantin Leue <77660791+Consti3D@users.noreply.github.com> Date: Fri, 7 Aug 2026 23:14:50 +0200 Subject: [PATCH] Apply the drone status panel's header treatment to Missions & Drones Same change as the drone status panel: drop the title row, float the close button over the tab row (reserving 48px on its right), and give the tabs more vertical padding so they don't look cramped without the title above them. --- app/lib/ui/widgets/missions_drones_panel.dart | 67 ++++++++++--------- 1 file changed, 35 insertions(+), 32 deletions(-) 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(