mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-26 02:36:37 +00:00
Fix desktop theme
This commit is contained in:
parent
f46ca7ad13
commit
a56af9dbec
|
@ -29,17 +29,13 @@ abstract class AppThemeFactory {
|
||||||
if (Platform.isLinux) {
|
if (Platform.isLinux) {
|
||||||
GtkThemeData themeData = await GtkThemeData.initialize();
|
GtkThemeData themeData = await GtkThemeData.initialize();
|
||||||
final isGtkDark =
|
final isGtkDark =
|
||||||
Color(themeData.theme_base_color).computeLuminance() < 0.5;
|
Color(themeData.theme_bg_color).computeLuminance() < 0.5;
|
||||||
final isInverseNeeded = isGtkDark != isDark;
|
final isInverseNeeded = isGtkDark != isDark;
|
||||||
gtkColorsScheme = ColorScheme.fromSeed(
|
gtkColorsScheme = ColorScheme.fromSeed(
|
||||||
seedColor: Color(themeData.theme_selected_bg_color),
|
seedColor: Color(themeData.theme_selected_bg_color),
|
||||||
brightness: brightness,
|
brightness: brightness,
|
||||||
background: isInverseNeeded
|
background: isInverseNeeded ? null : Color(themeData.theme_bg_color),
|
||||||
? Color(themeData.theme_base_color)
|
surface: isInverseNeeded ? null : Color(themeData.theme_base_color),
|
||||||
: Color(themeData.theme_bg_color),
|
|
||||||
surface: isInverseNeeded
|
|
||||||
? Color(themeData.theme_bg_color)
|
|
||||||
: Color(themeData.theme_base_color),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue