From 125791e44c41d789ef528d47013c84128442392c Mon Sep 17 00:00:00 2001 From: Caten Date: Fri, 6 Feb 2026 16:16:32 +0800 Subject: [PATCH] Move fab button --- lib/main.dart | 39 +++++++++++++++++---------------------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 0928c51..2cf2167 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1205,7 +1205,7 @@ class TerminalPage extends StatelessWidget { }, child: Text(D.termCommands[index]["name"]! as String)); }, separatorBuilder:(context, index) { return const SizedBox.square(dimension: 4); - }, itemCount: D.termCommands.length))), SizedBox.fromSize(size: const Size(72, 0))])):const SizedBox.square(dimension: 0); + }, itemCount: D.termCommands.length)))])):const SizedBox.square(dimension: 0); }) ]); } @@ -1344,6 +1344,22 @@ class _MyHomePageState extends State { return Scaffold( appBar: AppBar( title: Text(isLoadingComplete ? Util.getCurrentProp("name") : widget.title), + actions: [ + Visibility( + visible: isLoadingComplete, + child: IconButton.filledTonal( + onPressed: () { + if (G.wasX11Enabled) { + Workflow.launchX11(); + } else if (G.wasAvncEnabled) { + Workflow.launchAvnc(); + } else { + Workflow.launchBrowser(); + } + }, + icon: const Icon(Icons.play_arrow), + tooltip: AppLocalizations.of(context)!.enterGUI)) + ], ), body: isLoadingComplete ? ValueListenableBuilder( @@ -1413,27 +1429,6 @@ class _MyHomePageState extends State { ); }, ), - floatingActionButton: ValueListenableBuilder( - valueListenable: G.pageIndex, - builder: (context, value, child) { - return Visibility( - visible: isLoadingComplete && (value == 0), - child: FloatingActionButton( - tooltip: AppLocalizations.of(context)!.enterGUI, - onPressed: () { - if (G.wasX11Enabled) { - Workflow.launchX11(); - } else if (G.wasAvncEnabled) { - Workflow.launchAvnc(); - } else { - Workflow.launchBrowser(); - } - }, - child: const Icon(Icons.play_arrow), - ), - ); - }, - ), ); } }