docs: item 10 is done, and the three GTK facts it cost are written down
todo.md's item 10 is closed with what moved, what stayed in code and why, the reading each slice added, and the three GTK facts in invariants-gtk-and-chrome.md. The plan's table is marked complete, with the note that the header bar went last and in one change -- pack_start appends after whatever a file packed, so staging it by group would have reordered the bar in an intermediate commit. Two facts added to the invariants: a code-added header-bar child lands after the file's, so going first means the file declares a slot (which is what header-bar.ui does for the time-window control); and <child type="end"> is added leftwards-from-the-right, so a header bar's end group reads the reverse of the file.
This commit is contained in:
1 parent
28d80f2e90
commit
afb9680fd7
3 files changed
+21
-9
No files matched your search
@@ -24,12 +24,7 @@
|
||||
- defaults
|
||||
- other parameters
|
||||
|
||||
10. [ ] move the interface into `.ui` resources, and to current GTK4/libadwaita widgets while doing it:
|
||||
- the shortcut overview is **done** (`src/ui/shortcuts.ui`, with the mouse gestures drawn as icons, and `[help]`'s `ui=` against `tables=` as the guard)
|
||||
- the preferences are **done** (`src/ui/preferences.ui`: `AdwPreferencesDialog` with `AdwEntryRow`/`AdwSpinRow`/`AdwSwitchRow`/`AdwComboRow`, applying as they change, no Apply button)
|
||||
- the help window's chrome is **done** (`src/ui/help.ui`: `AdwWindow` + header bar + `AdwNavigationSplitView`)
|
||||
- the host form is **done** (`src/ui/source-form.ui`); the source chooser's own window is next
|
||||
- the main window's skeleton is **done** (`src/ui/main-window.ui`: the window, the two panes, the plot column and the status line, the sidebar's scroller); the panels inside it are the next slices
|
||||
- the side panels are being extracted one per commit on that pattern: the cursors panel is **done** (`src/ui/cursors-panel.ui`), and the measurements panel, the trigger panel, the signals panel, the math panel, the events pane, the layout editor's buttons and the header bar are queued in the plan
|
||||
- still in code, in the plan's own order: the source chooser's window (its host form is done), the measurements panel, the trigger panel, the signals panel, the math panel and the node editor's chrome, the events pane, the layout editor's overlay buttons, and the header bar — eight slices, each with its own row in the plan's table
|
||||
- plan, conventions and acceptance for each slice: `docs/superpowers/plans/2026-10-11-ui-files-and-gtk4-practice.md`
|
||||
- [x] (10) ~~move the interface into `.ui` resources, and to current GTK4/libadwaita widgets while doing it~~ **done**: one slice per commit, 14 `.ui` files under `src/ui/`, every one of them in `udpscope-ui.gresource.xml` and checked by `make test-ui`, which type-checks each property and child against the GIR and refuses a file the xml does not list. Moved: the shortcut overview, the preferences, the help window's chrome, the host form, the main window's skeleton, the cursors panel, the source chooser's window (an `AdwViewStack` under an `AdwViewSwitcherBar` in place of the notebook), the measurements panel, the trigger panel, the signals panel, the math panel, the math editor's window with its identity row, canvas and action row, the events pane, and the header bar.
|
||||
- what stays in code, and why: the *rows* (one per signal, measurement, event, channel or node, rebuilt from the model); the math editor's palette and parameter form (the palette is the operation table, the form follows the selection); and the layout editor's overlay buttons, whose *count* is the row count -- a `GtkBuilder` instantiates a file's objects once, so a file can hold neither the number nor a prototype for the code to copy. That row was closed by factoring the look its three loops shared into one function instead.
|
||||
- the reading each slice added: `[sidebar-probe]`, `[prefs-probe] mnemonics=`, `[sources] chooser ui:`, `measures pane:`'s `switch_on`/`reset_sensitive`, `trigger panel:`'s `controls_inside`, `signals panel:`, `math panel:`, `[math-probe] dialog build:`'s `name=`/`unit=`, `events pane:`'s `nested`, and the header bar through the unchanged `[udpscope] header:` geometry -- each of them reading the frame back rather than asserting it.
|
||||
- the three GTK facts these slices cost, all in `docs/claude/invariants-gtk-and-chrome.md`: an expander's child is not in the widget-parent chain; a `.ui` file instantiates its objects once; and a code-added header-bar child lands after the file's, which is why the window control goes into a slot the file declares.
|
||||
Reference in new issue
Block a user