From d5eb136419c4e040c509168051001033810e7ffd Mon Sep 17 00:00:00 2001 From: admar Date: Mon, 17 Apr 2023 22:04:00 +0200 Subject: [PATCH] Fixed color of buttons in select wake up sound menu a nd in select theme menu --- clock.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/clock.py b/clock.py index ef79d84..8f560d7 100644 --- a/clock.py +++ b/clock.py @@ -236,6 +236,17 @@ class MyClockWidget(FloatLayout): is_arm = is_arm() + def apply_theme(self): + if self.theme_selected == "Automatic": + self.theme = Theme("Light") + else: + self.theme = Theme(self.theme_selected) + + self.ids["settings_menu_wake_up_sound_label_top"].color = self.theme.color_font + self.settings_menu_wake_up_sound_Ok_button.color = self.theme.color_font + self.ids["settings_menu_theme_label_top"].color = self.theme.color_font + self.settings_menu_theme_Ok_button.color = self.theme.color_font + def add_themes(self): x = self.ids["settings_menu_theme_boxlayout"] gl = GridLayout( @@ -292,10 +303,7 @@ class MyClockWidget(FloatLayout): x.add_widget(b) self.settings_menu_theme_Ok_button = b - if self.theme_selected == "Automatic": - self.theme = Theme("Light") - else: - self.theme = Theme(self.theme_selected) + self.apply_theme() def add_wake_up_sounds(self): alarm_settings = App.get_running_app().alarm_settings @@ -949,10 +957,7 @@ class MyClockWidget(FloatLayout): self.theme_selected = theme - if theme == "Automatic": - self.theme = Theme("Light") - else: - self.theme = Theme(theme) + self.apply_theme() def volume_slider_value(self, *args): alarm_settings = App.get_running_app().alarm_settings