@@ -72,17 +72,6 @@ def run_gui(devices):
72
72
checkbox .pack (anchor = "w" )
73
73
device_checkboxes [dev .name ] = checkbox_var
74
74
75
- # Device Control Buttons
76
- device_control_frame = ttk .LabelFrame (tab1 , text = "Device Control" , style = "TLabelframe" )
77
- device_control_frame .pack (fill = "x" , padx = 10 , pady = 5 )
78
- control_buttons = {
79
- "Bootloader" : "bootloader" ,
80
- "Sleep" : "sleep" ,
81
- "Wake" : "wake"
82
- }
83
- for text , action in control_buttons .items ():
84
- ttk .Button (device_control_frame , text = text , command = lambda a = action : perform_action (devices , a ), style = "TButton" ).pack (side = "left" , padx = 5 , pady = 5 )
85
-
86
75
# Brightness Slider
87
76
brightness_frame = ttk .LabelFrame (tab1 , text = "Brightness" , style = "TLabelframe" )
88
77
brightness_frame .pack (fill = "x" , padx = 10 , pady = 5 )
@@ -160,6 +149,18 @@ def run_gui(devices):
160
149
ttk .Button (equalizer_frame , text = "Start random equalizer" , command = lambda : perform_action (devices , "start_eq" ), style = "TButton" ).pack (side = "left" , padx = 5 , pady = 5 )
161
150
ttk .Button (equalizer_frame , text = "Stop" , command = stop_thread , style = "TButton" ).pack (side = "left" , padx = 5 , pady = 5 )
162
151
152
+ # Device Control Buttons
153
+ device_control_frame = ttk .LabelFrame (tab1 , text = "Device Control" , style = "TLabelframe" )
154
+ device_control_frame .pack (fill = "x" , padx = 10 , pady = 5 )
155
+ control_buttons = {
156
+ "Bootloader" : "bootloader" ,
157
+ "Sleep" : "sleep" ,
158
+ "Wake" : "wake"
159
+ }
160
+ for text , action in control_buttons .items ():
161
+ ttk .Button (device_control_frame , text = text , command = lambda a = action : perform_action (devices , a ), style = "TButton" ).pack (side = "left" , padx = 5 , pady = 5 )
162
+
163
+
163
164
root .mainloop ()
164
165
165
166
def perform_action (devices , action ):
0 commit comments