From ed7b69f7b3f1d800b0ec035713a145e11a61003c Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 1 Sep 2024 17:36:21 +0800 Subject: [PATCH] :bug: Fix windows title bar issue --- lib/main.dart | 2 +- lib/services/wm_tools.dart | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 9f7c4b7..fcd7a6c 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -66,7 +66,7 @@ class RhythmApp extends StatelessWidget { @override Widget build(BuildContext context) { return GetMaterialApp.router( - title: 'DietaryGuard', + title: 'RhythmBox', routerDelegate: router.routerDelegate, routeInformationParser: router.routeInformationParser, routeInformationProvider: router.routeInformationProvider, diff --git a/lib/services/wm_tools.dart b/lib/services/wm_tools.dart index f3b2794..7c66734 100755 --- a/lib/services/wm_tools.dart +++ b/lib/services/wm_tools.dart @@ -39,11 +39,12 @@ class WindowManagerTools with WidgetsBindingObserver { WidgetsBinding.instance.addObserver(instance); await windowManager.waitUntilReadyToShow( - const WindowOptions( + WindowOptions( title: 'RhythmBox', backgroundColor: Colors.transparent, - minimumSize: Size(300, 700), - titleBarStyle: TitleBarStyle.hidden, + minimumSize: const Size(300, 700), + titleBarStyle: + PlatformInfo.isMacOS ? TitleBarStyle.hidden : TitleBarStyle.normal, center: true, ), () async {