fix: the [edit] buttons' icons, and the locked pane says four lines not one
Two things the lock shipped wrong. **The "done" icon did not exist.** `emblem-ok-symbolic` is a breeze icon; Adwaita — which is what this app runs under — does not have it, so the button that leaves configuration mode drew a missing-image placeholder, i.e. nothing. Both names are now Adwaita's own: `document-edit-symbolic` (the pencil: edit) and `object-select-symbolic` (the check: done). This is exactly the silent failure `toolbar icons:` exists for, so the two `[edit]` buttons get the same treatment: `pane edits: locked=…(ok) config=…(ok)` is read by clicking into configuration mode and back, so one line carries both names and `gtk_icon_theme_has_icon()`'s verdict for each. The invariants now carry the rule, including the trap that a name found under `breeze` is not an answer. **The locked pane was too compact.** One line could not hold what a user opens the pane for, so it is now a small definition list: `signal`, `condition`, `level`, `mode` on four lines, and after that only the figures that are *not* at their defaults — `noise band`, `HF reject`, `pre-trigger`, `hold-off` — because a line reading "band 0" is a line that says nothing. The channel is resolved from the acquired channels and the condition quotes the figures its own shape reads (a width and its comparison, two levels, or a timeout), never one it ignores. The pane is ~192 px tall locked against 580 in configuration mode. One self-inflicted critical on the way: the probe read the summary with `gtk_label_get_text()`, and the container is a grid now — `Gtk-CRITICAL: assertion 'GTK_IS_LABEL (self)' failed`. The text comes from the sync that writes it instead. Verified: `pane edits: locked=document-edit-symbolic(ok) config=object-select-symbolic(ok)`; `panes: trigger=locked signals=locked body_visible=0 summary='signal: square | condition: window, falling | level: 0.3 .. 0.6 | mode: single | noise band: 0.2 | pre-trigger: 20 % | hold-off: 1000 ms'`; `make test-ui` 14 files; zero `Gtk-CRITICAL` and no missing icon.
This commit is contained in:
1 parent
121abbefae
commit
4f4851f4e3
7 files changed
+142
-41
No files matched your search
@@ -269,7 +269,12 @@ struct App {
|
||||
/// session: a lock is a mode, not a setting, so it is not persisted.
|
||||
bool trigger_locked = false;
|
||||
bool signals_locked = false;
|
||||
/// The locked trigger pane's content: a small definition list, because one line cannot hold the
|
||||
/// signal, the condition, the level and the mode, and those are what a user reads the pane for.
|
||||
GtkWidget* trigger_summary = nullptr;
|
||||
static constexpr int kTriggerSummaryRows = 8;
|
||||
GtkWidget* trigger_summary_keys[kTriggerSummaryRows] = {};
|
||||
GtkWidget* trigger_summary_values[kTriggerSummaryRows] = {};
|
||||
GtkWidget* trigger_edit = nullptr;
|
||||
GtkWidget* signals_edit = nullptr;
|
||||
int dbg_trigger_locked = -1;
|
||||
@@ -278,6 +283,10 @@ struct App {
|
||||
/// The compact line the locked trigger pane shows. It is the pane's whole content in that mode, so it
|
||||
/// is read rather than assumed: empty here is a locked pane showing nothing at all.
|
||||
std::string dbg_trigger_summary;
|
||||
/// The two [edit] buttons' icons, read in each mode by clicking into it and back: a button whose icon
|
||||
/// does not resolve is *blank*, and that is how the missing "done" icon was found.
|
||||
std::string dbg_pane_edit_icon;
|
||||
std::string dbg_pane_view_icon;
|
||||
/// The cursors pane: listing what the instruments read -- T0/T1/dT always, per row an Y1/Y2/dY
|
||||
/// where rulers are up, and in `mix` mode the value each cursor crosses each trace at.
|
||||
GtkWidget* cursors_mode_drop = nullptr;
|
||||
|
||||
Reference in new issue
Block a user