mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-05-11 02:16:00 +02:00
refact: web ui (#9217)
* refact: web ui Signed-off-by: fufesou <linlong1266@gmail.com> * refact: remove AppBar shadow Signed-off-by: fufesou <linlong1266@gmail.com> --------- Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
parent
bf390611ab
commit
ae339f039d
6 changed files with 188 additions and 126 deletions
|
@ -350,6 +350,9 @@ class MyTheme {
|
|||
hoverColor: Color.fromARGB(255, 224, 224, 224),
|
||||
scaffoldBackgroundColor: Colors.white,
|
||||
dialogBackgroundColor: Colors.white,
|
||||
appBarTheme: AppBarTheme(
|
||||
shadowColor: Colors.transparent,
|
||||
),
|
||||
dialogTheme: DialogTheme(
|
||||
elevation: 15,
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -445,6 +448,9 @@ class MyTheme {
|
|||
hoverColor: Color.fromARGB(255, 45, 46, 53),
|
||||
scaffoldBackgroundColor: Color(0xFF18191E),
|
||||
dialogBackgroundColor: Color(0xFF18191E),
|
||||
appBarTheme: AppBarTheme(
|
||||
shadowColor: Colors.transparent,
|
||||
),
|
||||
dialogTheme: DialogTheme(
|
||||
elevation: 15,
|
||||
shape: RoundedRectangleBorder(
|
||||
|
@ -550,7 +556,7 @@ class MyTheme {
|
|||
|
||||
static void changeDarkMode(ThemeMode mode) async {
|
||||
Get.changeThemeMode(mode);
|
||||
if (desktopType == DesktopType.main || isAndroid || isIOS) {
|
||||
if (desktopType == DesktopType.main || isAndroid || isIOS || isWeb) {
|
||||
if (mode == ThemeMode.system) {
|
||||
await bind.mainSetLocalOption(
|
||||
key: kCommConfKeyTheme, value: defaultOptionTheme);
|
||||
|
@ -558,7 +564,7 @@ class MyTheme {
|
|||
await bind.mainSetLocalOption(
|
||||
key: kCommConfKeyTheme, value: mode.toShortString());
|
||||
}
|
||||
await bind.mainChangeTheme(dark: mode.toShortString());
|
||||
if (!isWeb) await bind.mainChangeTheme(dark: mode.toShortString());
|
||||
// Synchronize the window theme of the system.
|
||||
updateSystemWindowTheme();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue