Skip to content

Commit adc2673

Browse files
committed
python: Move device control to the bottom
Users don't usually need it, move it away. Signed-off-by: Daniel Schaefer <[email protected]>
1 parent d90902b commit adc2673

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

python/inputmodule/gui/__init__.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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

165166
def perform_action(devices, action):

0 commit comments

Comments
 (0)