From 9cec5e901a4522a062f23c0b378c61c720b8b915 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 3 May 2022 15:18:06 +0300 Subject: [PATCH] hardcode dark theme on linux for now --- lib/theming/factory/app_theme_factory.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/theming/factory/app_theme_factory.dart b/lib/theming/factory/app_theme_factory.dart index 87478612..82407dfb 100644 --- a/lib/theming/factory/app_theme_factory.dart +++ b/lib/theming/factory/app_theme_factory.dart @@ -30,7 +30,9 @@ abstract class AppThemeFactory { GtkThemeData themeData = await GtkThemeData.initialize(); gtkColorsScheme = ColorScheme.fromSeed( seedColor: Color(themeData.theme_selected_bg_color), - brightness: brightness, + brightness: Color(themeData.theme_base_color).computeLuminance() > 0.5 + ? Brightness.light + : Brightness.dark, background: Color(themeData.theme_bg_color), surface: Color(themeData.theme_base_color), );