flutter_desktop: remote menu refactor

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2022-10-30 18:26:00 +08:00
parent 6756b67492
commit f111306ef0

View File

@ -111,13 +111,19 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
}, },
onPressed: () { onPressed: () {
_show.value = !_show.value; _show.value = !_show.value;
_hideColor.value = Colors.white24;
if (_show.isTrue) { if (_show.isTrue) {
_updateScreen(); _updateScreen();
} }
}, },
child: Obx(() => Container( child: Obx(() => Container(
decoration: BoxDecoration(
color: _hideColor.value, 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 { _updateScreen() async {
@ -170,7 +176,11 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
textStyle: TextStyle(color: _MenubarTheme.commonColor)), textStyle: TextStyle(color: _MenubarTheme.commonColor)),
child: Column(mainAxisSize: MainAxisSize.min, children: [ child: Column(mainAxisSize: MainAxisSize.min, children: [
Container( Container(
decoration: BoxDecoration(
color: Colors.white, color: Colors.white,
border: Border.all(color: MyTheme.border),
borderRadius: BorderRadius.all(Radius.circular(10.0)),
),
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: menubarItems, children: menubarItems,