summaryrefslogtreecommitdiff
path: root/ui/main_window.py
diff options
context:
space:
mode:
authorChristian Kolset <ckolset@colostate.edu>2026-08-11 10:40:12 -0600
committerChristian Kolset <ckolset@colostate.edu>2026-08-11 10:40:12 -0600
commit57a5e6be6d581710d7eeaadc91c3b5742fb81b53 (patch)
tree10b7188fbe885d6d26a95d3c94d75c856d1888c2 /ui/main_window.py
parente81b74d7faf0ec884749795153124a2fa31411fc (diff)
Fix native-style Qt warning; add a few tooltips; trim Namespace hint text
Root cause of "QFont::setPointSize: Point size <= 0 (-1)" on some dropdowns: the app never sets an explicit widget style, so it defaults to native windowsvista, whose popup code calls setPointSize() on fonts resolved from our QSS's pixel-based font-size (pointSize() is -1 by design for px fonts). Tried app.setStyle("Fusion") first — silences it, but Fusion doesn't render buttons/dropdowns to match the QSS the way the native style does. Kept native style, filtered just that one message via qInstallMessageHandler instead — it's cosmetic Qt console noise (the rejected setPointSize call is a no-op, doesn't affect rendering), not a real bug. Also adds a handful of tooltips (Control Editor's Check Syntax/Cancel/ Create Control, device Configure dialog's Close, main toolbar's View/ Configure/RUN/LOG/Settings, a few Control Panel widgets) from an in-progress app-wide tooltip pass, paused partway through by request — remaining buttons are being done manually. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Diffstat (limited to 'ui/main_window.py')
-rw-r--r--ui/main_window.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/main_window.py b/ui/main_window.py
index 77f8286..19d4c69 100644
--- a/ui/main_window.py
+++ b/ui/main_window.py
@@ -188,6 +188,7 @@ class MainWindow(QMainWindow):
# ── ⊞ View menu ───────────────────────────────────────────────────
view_btn = QPushButton("⊞ View ▾"); view_btn.setObjectName("toolbarSectionBtn")
+ view_btn.setToolTip("Show/hide the Control Panel and Namespace docks")
self._view_menu = QMenu(self)
self._act_ctrl_panel = QAction("Control Panel", self)
@@ -209,16 +210,19 @@ class MainWindow(QMainWindow):
tb.addWidget(view_btn)
config_btn = QPushButton("⚙ Configure"); config_btn.setObjectName("toolbarSectionBtn")
+ config_btn.setToolTip("Open Configuration — Devices, Channels, and Plot layout")
config_btn.clicked.connect(lambda: self._open_config(0))
tb.addWidget(config_btn)
tb.addWidget(_sep())
self._run_btn = QPushButton("▶ RUN")
+ self._run_btn.setToolTip("Start/stop acquisition")
self._run_btn.setObjectName("runButton"); self._run_btn.setCheckable(True)
self._run_btn.clicked.connect(self._toggle_run); tb.addWidget(self._run_btn)
self._log_btn = QPushButton("⬤ LOG")
+ self._log_btn.setToolTip("Start/stop logging data to CSV (only available while running)")
self._log_btn.setObjectName("logButton"); self._log_btn.setCheckable(True)
self._log_btn.setEnabled(False); self._log_btn.clicked.connect(self._toggle_log)
tb.addWidget(self._log_btn)
@@ -246,6 +250,7 @@ class MainWindow(QMainWindow):
tb.addWidget(_sep())
set_btn = QPushButton("⚙ Settings")
+ set_btn.setToolTip("App settings, theme, plugins")
set_btn.setObjectName("toolbarSectionBtn"); set_btn.setCheckable(True)
set_btn.clicked.connect(lambda c: self._open_settings())
tb.addWidget(set_btn); self._btn_settings = set_btn