summaryrefslogtreecommitdiff
path: root/ui/style_dark.qss
diff options
context:
space:
mode:
authorChristian Kolset <ckolset@colostate.edu>2026-07-29 13:17:00 -0600
committerChristian Kolset <ckolset@colostate.edu>2026-07-29 13:17:00 -0600
commitad7f1c39ef473a327ca3b467b579be0099377f55 (patch)
tree1b173451477464fa98b89ff93249684af92a63dc /ui/style_dark.qss
parentb407a079000f6a4b04ecf38eca17c57719e7a7ec (diff)
Make Run the master stop switch; add Log button disabled/recording styling
Run/Stop previously only paused acquisition — control outputs (motor speed, switches, PWM duty) kept whatever value was last written, so stopping the run loop didn't stop a running motor. Adds ControlWidget.safe_stop() (per-widget override, default zeros the output) and ControlPanel.safe_stop_all(), called from _toggle_run's Stop branch before engine.stop(). Per-widget behavior is deliberately not uniform: - OnOffSwitch/MotorControl/PwmControl have a latched running/enabled state, so safe_stop() drives their own toggle handler (consistent UI + write in one path) and, for Motor/PWM, zeroes the slider too. - SetpointControl/AnalogOutputControl only write on an explicit user action and have no universally safe forced value (e.g. 0 isn't necessarily "off" for an arbitrary process setpoint or analog output) — Stop leaves them untouched rather than guessing. Log button: added a :disabled QSS rule so "can't log yet" reads as clearly inert rather than a duller version of the enabled look, and a 600ms blink (toggling a "recording" dynamic property the QSS keys off) while a recording is active, so it reads as live/recording rather than a static pressed button. Master Stop now calls _toggle_log(False) explicitly when forcing the button off, since QPushButton.setChecked() doesn't emit clicked — without this the blink would keep running after a master Stop even though logging itself already halted via engine.stop()'s internal stop_logging() call. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'ui/style_dark.qss')
-rw-r--r--ui/style_dark.qss2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/style_dark.qss b/ui/style_dark.qss
index e562365..9fd7198 100644
--- a/ui/style_dark.qss
+++ b/ui/style_dark.qss
@@ -63,7 +63,9 @@ QPushButton#logButton {
min-width: 80px;
}
QPushButton#logButton:enabled { color: #e2e8f0; border-color: #3b82f6; }
+QPushButton#logButton:disabled { background-color: #12172a; color: #3d4a6b; border: 1px solid #1e2740; }
QPushButton#logButton:checked { background-color: #7c2d12; border-color: #ef4444; color: #fee2e2; }
+QPushButton#logButton[recording="true"] { background-color: #ef4444; border-color: #fca5a5; color: #ffffff; }
QPushButton#addDeviceButton {
background-color: #1e3a5f;