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.
This commit is contained in:
Constantin Leue
2026-08-07 23:14:50 +02:00
parent eb76d4deb1
commit d8a0809935
+25 -22
View File
@@ -36,35 +36,26 @@ class _MissionsDronesPanelState extends ConsumerState<MissionsDronesPanel> {
return Material( return Material(
color: const Color(0xEB080808), color: const Color(0xEB080808),
child: SafeArea( 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: [
Column(
children: [ children: [
Padding( Padding(
padding: const EdgeInsets.fromLTRB(16, 12, 8, 12), // Rechts Platz fuer den schwebenden Schliessen-Knopf, damit
// "Drones" nicht darunter verschwindet.
padding: const EdgeInsets.only(right: 48),
child: Row( 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(
children: [ children: [
_tabButton('Missions', _ManagementTab.missions), _tabButton('Missions', _ManagementTab.missions),
_tabButton('Drones', _ManagementTab.drones), _tabButton('Drones', _ManagementTab.drones),
], ],
), ),
),
const Divider(color: Colors.white24, height: 1), const Divider(color: Colors.white24, height: 1),
Expanded( Expanded(
child: switch (_tab) { child: switch (_tab) {
@@ -74,6 +65,16 @@ class _MissionsDronesPanelState extends ConsumerState<MissionsDronesPanel> {
), ),
], ],
), ),
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<MissionsDronesPanel> {
child: InkWell( child: InkWell(
onTap: () => setState(() => _tab = tab), onTap: () => setState(() => _tab = tab),
child: Container( 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( decoration: BoxDecoration(
border: Border( border: Border(
bottom: BorderSide( bottom: BorderSide(