@@ -72,17 +72,6 @@ def run_gui(devices):
7272 checkbox .pack (anchor = "w" )
7373 device_checkboxes [dev .name ] = checkbox_var
7474
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-
8675 # Brightness Slider
8776 brightness_frame = ttk .LabelFrame (tab1 , text = "Brightness" , style = "TLabelframe" )
8877 brightness_frame .pack (fill = "x" , padx = 10 , pady = 5 )
@@ -160,6 +149,18 @@ def run_gui(devices):
160149 ttk .Button (equalizer_frame , text = "Start random equalizer" , command = lambda : perform_action (devices , "start_eq" ), style = "TButton" ).pack (side = "left" , padx = 5 , pady = 5 )
161150 ttk .Button (equalizer_frame , text = "Stop" , command = stop_thread , style = "TButton" ).pack (side = "left" , padx = 5 , pady = 5 )
162151
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+
163164 root .mainloop ()
164165
165166def perform_action (devices , action ):
0 commit comments