Per-metric ref lines with Hz spectrogram units; relative-time toggle; fixed font
Reference lines: - Kept per metric (dict keyed by metric_id) so switching metrics and coming back preserves them, instead of clearing on every switch - Spectrogram lines read/edit/drag in Hz: the renderer installs Hz<->row-index transforms (the heatmap y-axis is a row index), so value, label, the edit dialog, and the new-line default all speak frequency. Curve metrics stay identity. Round-trip verified (1000 Hz -> row -> 1000 Hz) - Line label and drag-readback always in the metric's natural units Controls: - Relative-time abs/rel is now a checkbox toggle, not a dropdown - Removed the font control panel; UI font is locked to M PLUS 1 Code @ 10pt via font_manager.apply_fixed_font (system-default fallback). Deleted font_control_widget.py Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -26,7 +26,7 @@ _STYLE_CHOICES = [("Solid", "solid"), ("Dashed", "dash"), ("Dotted", "dot")]
|
||||
class RefLineDialog(QDialog):
|
||||
"""Edit one reference line's properties. Read the result via `result_props`."""
|
||||
|
||||
def __init__(self, parent, props: RefLineProps):
|
||||
def __init__(self, parent, props: RefLineProps, value_units: str = ""):
|
||||
super().__init__(parent)
|
||||
self.setWindowTitle("Reference line")
|
||||
self._color = props.color
|
||||
@@ -37,6 +37,8 @@ class RefLineDialog(QDialog):
|
||||
self.value_spin.setRange(-1e6, 1e6)
|
||||
self.value_spin.setDecimals(2)
|
||||
self.value_spin.setValue(props.value)
|
||||
if value_units:
|
||||
self.value_spin.setSuffix(f" {value_units}")
|
||||
form.addRow("Value:", self.value_spin)
|
||||
|
||||
self.color_button = QPushButton()
|
||||
|
||||
Reference in New Issue
Block a user