Skip to content

Commit 04c6d96

Browse files
committed
Removed exit button from controls
1 parent 9836d37 commit 04c6d96

File tree

1 file changed

+4
-25
lines changed

1 file changed

+4
-25
lines changed

lib/screens/home_screen.dart

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ class _HomeScreenState extends State<HomeScreen> {
4949
// Closing map controls
5050
_mapControlsExpanded = false;
5151
} else {
52-
// Opening map controls - close control panel first
53-
_showControlPanel = false;
52+
// Opening map controls
5453
_mapControlsExpanded = true;
5554
}
5655
});
@@ -62,7 +61,6 @@ class _HomeScreenState extends State<HomeScreen> {
6261
if (MediaQuery.of(context).orientation == Orientation.landscape) {
6362
return 0;
6463
}
65-
if (!_showControlPanel) return 0;
6664
// Approximate heights including Card margins (8px * 2 = 16px)
6765
// Minimized: Row padding (12) + content (~32) + margin (16) = ~60px
6866
// Expanded: ListTile (56) + Divider (1) + ConnectionPanel (~100) + PingControls (~140) + margin (16) = ~320px
@@ -379,9 +377,8 @@ class _HomeScreenState extends State<HomeScreen> {
379377
),
380378
),
381379

382-
// Control panel overlay
383-
if (_showControlPanel)
384-
Positioned(
380+
// Control panel overlay (always visible in portrait)
381+
Positioned(
385382
bottom: 0,
386383
left: 0,
387384
right: 0,
@@ -755,7 +752,7 @@ class _HomeScreenState extends State<HomeScreen> {
755752
child: Column(
756753
mainAxisSize: MainAxisSize.min,
757754
children: [
758-
// Header with help, minimize, and close buttons
755+
// Header with help and minimize buttons
759756
ListTile(
760757
title: const Text('Controls', style: TextStyle(fontWeight: FontWeight.bold)),
761758
trailing: Row(
@@ -771,11 +768,6 @@ class _HomeScreenState extends State<HomeScreen> {
771768
onPressed: () => setState(() => _isControlsMinimized = true),
772769
tooltip: 'Minimize',
773770
),
774-
IconButton(
775-
icon: const Icon(Icons.close),
776-
onPressed: () => setState(() => _showControlPanel = false),
777-
tooltip: 'Close',
778-
),
779771
],
780772
),
781773
),
@@ -829,19 +821,6 @@ class _HomeScreenState extends State<HomeScreen> {
829821
),
830822
),
831823
),
832-
// Close button
833-
GestureDetector(
834-
onTap: () => setState(() => _showControlPanel = false),
835-
behavior: HitTestBehavior.opaque,
836-
child: Padding(
837-
padding: const EdgeInsets.all(6),
838-
child: Icon(
839-
Icons.close,
840-
size: 20,
841-
color: Colors.grey.shade500,
842-
),
843-
),
844-
),
845824
],
846825
),
847826
),

0 commit comments

Comments
 (0)