Merge pull request #4563 from grummbeer/desktop-remove-splash-radius

Remove splash for radio/switches on Desktop
This commit is contained in:
RustDesk 2023-06-06 21:24:10 +08:00 committed by GitHub
commit 3abc805b21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -183,7 +183,13 @@ class MyTheme {
),
);
static const SwitchThemeData switchTheme = SwitchThemeData(splashRadius: 0);
static SwitchThemeData switchTheme() {
return SwitchThemeData(splashRadius: isDesktop ? 0 : kRadialReactionRadius);
}
static RadioThemeData radioTheme() {
return RadioThemeData(splashRadius: isDesktop ? 0 : kRadialReactionRadius);
}
// Checkbox
static const CheckboxThemeData checkboxTheme = CheckboxThemeData(
@ -309,7 +315,8 @@ class MyTheme {
),
),
),
switchTheme: switchTheme,
switchTheme: switchTheme(),
radioTheme: radioTheme(),
checkboxTheme: checkboxTheme,
listTileTheme: listTileTheme,
menuBarTheme: MenuBarThemeData(
@ -404,7 +411,8 @@ class MyTheme {
),
),
),
switchTheme: switchTheme,
switchTheme: switchTheme(),
radioTheme: radioTheme(),
checkboxTheme: checkboxTheme,
listTileTheme: listTileTheme,
menuBarTheme: MenuBarThemeData(