docs: the readouts strip
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
c8d9d04f59
commit
3526ce0541
8 files changed
+75
-5
No files matched your search
@@ -57,6 +57,18 @@ Part of [CLAUDE.md](../../CLAUDE.md). These are rules that cost a defect to lear
|
||||
pin). `[cursors-probe] ... dock cursors:` and `[measures-probe] ... dock measures:` assert it: `same_text=1`
|
||||
compares `gtk_label_get_text()` (the untruncated text) of every dock label with the page's, and
|
||||
`fits=1` that the Readouts box is no wider than the dock.
|
||||
- **The readouts strip is a third reader of the same string, never a second formatter.** When the dock is
|
||||
not on screen the readouts are shown in the strip under the plot (`readouts_strip`, `src/ui_dock.cpp`): the
|
||||
cursor chips' `who` and *delta* labels and the measurement chips' value labels. They are written **in the
|
||||
same call** as the dock's -- `dock_cursor_cell()` and `dock_measure_value()` set the strip's label from the
|
||||
argument they were handed, and `dock_rebuild_cursors()` / `dock_rebuild_measures()` rebuild its chips
|
||||
beside the dock's lines -- so a value is still formatted once, into one local, and a feature that writes a
|
||||
dock cell without going through those two setters leaves the strip stale. The strip keeps the dock's
|
||||
rules: the same fixed-width ellipsized cells (who 6, type 10, value 9 characters, full text in the
|
||||
tooltip), the delta cell reads `--` on the same branches, and the cursor chips are *insensitive* with the
|
||||
cursors off and never hidden -- through `dock_set_cursors_sensitive()`, which writes the dock's grid and the
|
||||
strip's chip box together; a second `gtk_widget_set_sensitive()` on either is two spellings of one state.
|
||||
`[cursors-probe]` / `[measures-probe]` `strip: ... same_text=1` asserts it.
|
||||
- **`format_measure()` is the one formatter for both panes, and its SI prefix does not depend on
|
||||
there being a unit.** The cursors pane's values and the measurements pane's `text=` go through
|
||||
it, so a change reaches both. The prefix ladder used to be inside `if (!unit.empty())`, which
|
||||
|
||||
Reference in new issue
Block a user