mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-05-12 19:06:13 +02:00
fix: synchronize macOS window theme on flutter theme changed.
This commit is contained in:
parent
76adc8de20
commit
6119e04006
6 changed files with 94 additions and 1 deletions
|
@ -108,6 +108,8 @@ Future<void> initEnv(String appType) async {
|
|||
await initGlobalFFI();
|
||||
// await Firebase.initializeApp();
|
||||
_registerEventHandler();
|
||||
// Update the system theme.
|
||||
updateSystemWindowTheme();
|
||||
}
|
||||
|
||||
void runMainApp(bool startService) async {
|
||||
|
@ -327,6 +329,8 @@ class _AppState extends State<App> {
|
|||
to = ThemeMode.light;
|
||||
}
|
||||
Get.changeThemeMode(to);
|
||||
// Synchronize the window theme of the system.
|
||||
updateSystemWindowTheme();
|
||||
if (desktopType == DesktopType.main) {
|
||||
bind.mainChangeTheme(dark: to.toShortString());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue