@@ -18,11 +18,12 @@ def __init__(self):
1818 super ().__init__ ()
1919 self .prefs = None
2020 self .settings = [
21- {"title" : "Light/Dark Theme" , "key" : "light_dark_theme" , "value_label" : None , "cont" : None },
22- {"title" : "Theme Color" , "key" : "theme_color" , "value_label" : None , "cont" : None , "placeholder" : "HTML hex color, like: EC048C" },
23- {"title" : "Reboot into Bootloader" , "key" : "boot_mode" , "value_label" : None , "cont" : None },
24- {"title" : "Display Brightness" , "key" : "display_brightness" , "value_label" : None , "cont" : None , "placeholder" : "A value from 0 to 100." },
25- {"title" : "Timezone" , "key" : "timezone" , "value_label" : None , "cont" : None , "placeholder" : "Example: Europe/Prague" },
21+ {"title" : "Light/Dark Theme" , "key" : "theme_light_dark" , "value_label" : None , "cont" : None },
22+ {"title" : "Theme Color" , "key" : "theme_primary_color" , "value_label" : None , "cont" : None , "placeholder" : "HTML hex color, like: EC048C" },
23+ #{"title": "Display Brightness", "key": "display_brightness", "value_label": None, "cont": None, "placeholder": "A value from 0 to 100."},
24+ # Maybe also add font size (but ideally then all fonts should scale up/down)
25+ #{"title": "Reboot into Bootloader", "key": "boot_mode", "value_label": None, "cont": None}, # special that doesn't get saved
26+ #{"title": "Timezone", "key": "timezone", "value_label": None, "cont": None, "placeholder": "Example: Europe/Prague"},
2627 ]
2728
2829 def onCreate (self ):
@@ -105,7 +106,7 @@ def onCreate(self):
105106 setting_label .align (lv .ALIGN .TOP_LEFT ,0 ,0 )
106107 setting_label .set_style_text_font (lv .font_montserrat_26 , 0 )
107108
108- if setting ["key" ] == "light_dark_theme " or setting ["key" ] == "boot_mode" :
109+ if setting ["key" ] == "theme_light_dark " or setting ["key" ] == "boot_mode" :
109110 # Create container for radio buttons
110111 self .radio_container = lv .obj (settings_screen_detail )
111112 self .radio_container .set_width (lv .pct (100 ))
@@ -237,7 +238,7 @@ def cambutton_cb_unused(self, event):
237238 self .startActivityForResult (Intent (activity_class = CameraApp ).putExtra ("scanqr_mode" , True ), self .gotqr_result_callback )
238239
239240 def save_setting (self , setting ):
240- if ( setting ["key" ] == "light_dark_theme " or setting ["key" ] == "boot_mode" ) and self .radio_container :
241+ if ( setting ["key" ] == "theme_light_dark " or setting ["key" ] == "boot_mode" ) and self .radio_container :
241242 if setting ["key" ] == "boot_mode" :
242243 options = [("Normal" , "normal" ), ("Bootloader" , "bootloader" )]
243244 else :
0 commit comments