From f111306ef0aba069abac204797b7e94e3f027416 Mon Sep 17 00:00:00 2001 From: fufesou Date: Sun, 30 Oct 2022 18:26:00 +0800 Subject: [PATCH] flutter_desktop: remote menu refactor Signed-off-by: fufesou --- .../lib/desktop/widgets/remote_menubar.dart | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/flutter/lib/desktop/widgets/remote_menubar.dart b/flutter/lib/desktop/widgets/remote_menubar.dart index e670e5d80..86a169b7b 100644 --- a/flutter/lib/desktop/widgets/remote_menubar.dart +++ b/flutter/lib/desktop/widgets/remote_menubar.dart @@ -106,18 +106,24 @@ class _RemoteMenubarState extends State { width: 100, height: 13, child: TextButton( - onHover: (bool v) { - _hideColor.value = v ? Colors.white60 : Colors.white24; - }, - onPressed: () { - _show.value = !_show.value; - if (_show.isTrue) { - _updateScreen(); - } - }, - child: Obx(() => Container( + onHover: (bool v) { + _hideColor.value = v ? Colors.white60 : Colors.white24; + }, + onPressed: () { + _show.value = !_show.value; + _hideColor.value = Colors.white24; + if (_show.isTrue) { + _updateScreen(); + } + }, + child: Obx(() => Container( + decoration: BoxDecoration( color: _hideColor.value, - ).marginOnly(bottom: 8.0)))))); + border: Border.all(color: MyTheme.border), + borderRadius: BorderRadius.all(Radius.circular(5.0)), + ), + ).marginOnly(bottom: 8.0)), + )))); } _updateScreen() async { @@ -170,7 +176,11 @@ class _RemoteMenubarState extends State { textStyle: TextStyle(color: _MenubarTheme.commonColor)), child: Column(mainAxisSize: MainAxisSize.min, children: [ Container( - color: Colors.white, + decoration: BoxDecoration( + color: Colors.white, + border: Border.all(color: MyTheme.border), + borderRadius: BorderRadius.all(Radius.circular(10.0)), + ), child: Row( mainAxisSize: MainAxisSize.min, children: menubarItems,