@@ -56,22 +56,6 @@ def run_gui(devices):
56
56
tabControl .add (tab3 , text = "Advanced" )
57
57
tabControl .pack (expand = 1 , fill = "both" )
58
58
59
- # Configure dark theme
60
- style = ttk .Style ()
61
- root .configure (bg = "#2b2b2b" )
62
- style .configure ("TLabelframe" , background = "#2b2b2b" , foreground = "white" )
63
- style .configure ("TLabelframe.Label" , background = "#2b2b2b" , foreground = "white" )
64
- style .configure ("TCheckbutton" , background = "#2b2b2b" , foreground = "white" )
65
- if platform .system () == "Windows" : # On Windows, I don't know why background always stays white even if I set it to black
66
- style .configure ("TButton" , background = "white" , foreground = "#2b2b2b" )
67
- else :
68
- style .configure ("TButton" , background = "#2b2b2b" , foreground = "white" )
69
- style .configure ("TEntry" , fieldbackground = "#2b2b2b" , foreground = "white" )
70
- style .configure ("TCombobox" , fieldbackground = "#2b2b2b" , foreground = "white" )
71
- style .configure ("TScale" , background = "#2b2b2b" , troughcolor = "gray" )
72
- style .configure ("TSpinbox" , background = "#2b2b2b" , foreground = "white" )
73
- style .map ("TButton" , background = [("active" , "gray" ), ("!active" , "#2b2b2b" )])
74
-
75
59
# Device Checkboxes
76
60
detected_devices_frame = ttk .LabelFrame (root , text = "Detected Devices" , style = "TLabelframe" )
77
61
detected_devices_frame .pack (fill = "x" , padx = 10 , pady = 5 )
@@ -103,7 +87,7 @@ def run_gui(devices):
103
87
brightness_frame = ttk .LabelFrame (tab1 , text = "Brightness" , style = "TLabelframe" )
104
88
brightness_frame .pack (fill = "x" , padx = 10 , pady = 5 )
105
89
global brightness_scale
106
- brightness_scale = tk .Scale (brightness_frame , from_ = 0 , to = 255 , orient = 'horizontal' , command = lambda value : set_brightness (devices , value ), bg = "#2b2b2b" , fg = "white" , troughcolor = "gray" , highlightbackground = "#2b2b2b" )
90
+ brightness_scale = tk .Scale (brightness_frame , from_ = 0 , to = 255 , orient = 'horizontal' , command = lambda value : set_brightness (devices , value ))
107
91
brightness_scale .set (120 ) # Default value
108
92
brightness_scale .pack (fill = "x" , padx = 5 , pady = 5 )
109
93
@@ -120,20 +104,20 @@ def run_gui(devices):
120
104
# Pattern Combo Box
121
105
pattern_frame = ttk .LabelFrame (tab1 , text = "Pattern" , style = "TLabelframe" )
122
106
pattern_frame .pack (fill = "x" , padx = 10 , pady = 5 )
123
- pattern_combo = ttk .Combobox (pattern_frame , values = PATTERNS , style = "TCombobox" )
107
+ pattern_combo = ttk .Combobox (pattern_frame , values = PATTERNS , style = "TCombobox" , state = "readonly" )
124
108
pattern_combo .pack (fill = "x" , padx = 5 , pady = 5 )
125
109
pattern_combo .bind ("<<ComboboxSelected>>" , lambda event : set_pattern (devices , pattern_combo .get ()))
126
110
127
111
# Percentage Slider
128
112
percentage_frame = ttk .LabelFrame (tab1 , text = "Fill screen X% (could be volume indicator)" , style = "TLabelframe" )
129
113
percentage_frame .pack (fill = "x" , padx = 10 , pady = 5 )
130
- percentage_scale = tk .Scale (percentage_frame , from_ = 0 , to = 100 , orient = 'horizontal' , command = lambda value : set_percentage (devices , value ), bg = "#2b2b2b" , fg = "white" , troughcolor = "gray" , highlightbackground = "#2b2b2b" )
114
+ percentage_scale = tk .Scale (percentage_frame , from_ = 0 , to = 100 , orient = 'horizontal' , command = lambda value : set_percentage (devices , value ))
131
115
percentage_scale .pack (fill = "x" , padx = 5 , pady = 5 )
132
116
133
117
# Countdown Timer
134
118
countdown_frame = ttk .LabelFrame (tab2 , text = "Countdown Timer" , style = "TLabelframe" )
135
119
countdown_frame .pack (fill = "x" , padx = 10 , pady = 5 )
136
- countdown_spinbox = tk .Spinbox (countdown_frame , from_ = 1 , to = 60 , width = 5 , bg = "#2b2b2b" , fg = "white" , textvariable = tk .StringVar (value = 10 ))
120
+ countdown_spinbox = tk .Spinbox (countdown_frame , from_ = 1 , to = 60 , width = 5 , textvariable = tk .StringVar (value = 10 ))
137
121
countdown_spinbox .pack (side = "left" , padx = 5 , pady = 5 )
138
122
ttk .Label (countdown_frame , text = "Seconds" , style = "TLabel" ).pack (side = "left" )
139
123
ttk .Button (countdown_frame , text = "Start" , command = lambda : start_countdown (devices , countdown_spinbox .get ()), style = "TButton" ).pack (side = "left" , padx = 5 , pady = 5 )
@@ -166,7 +150,7 @@ def run_gui(devices):
166
150
# PWM Frequency Combo Box
167
151
pwm_freq_frame = ttk .LabelFrame (tab3 , text = "PWM Frequency" , style = "TLabelframe" )
168
152
pwm_freq_frame .pack (fill = "x" , padx = 10 , pady = 5 )
169
- pwm_freq_combo = ttk .Combobox (pwm_freq_frame , values = PWM_FREQUENCIES , style = "TCombobox" )
153
+ pwm_freq_combo = ttk .Combobox (pwm_freq_frame , values = PWM_FREQUENCIES , style = "TCombobox" , state = "readonly" )
170
154
pwm_freq_combo .pack (fill = "x" , padx = 5 , pady = 5 )
171
155
pwm_freq_combo .bind ("<<ComboboxSelected>>" , lambda : set_pwm_freq (devices , pwm_freq_combo .get ()))
172
156
0 commit comments