help: a tinier (i), hints beside their controls, and the tour starting in the chooser
The contextual help becomes the affordance the ask names: a plain (i) (`dialog-information-symbolic`) at **16x16**, and one that sits beside the control it explains rather than only in a pane's heading. - The mark: `GtkMenuButton` ignores `min-width` on the widget and a size request, so the size is made in `install_css()` on all three nodes (outer `menubutton`, its `button` subnode, the glyph). Measured 16x16 against the default 34x34; the dump prints it as `hint=WxH`, measured with `gtk_widget_compute_bounds()` on the first *visible* hint. - More sites: `events_record` (the "record events" switch in the trigger panel), `trigger_advanced` (the pre-trigger share row), `signals_config` (the signals pane's hint line, wrapped in a box so a hint can join it). Hints join as siblings, so none can cover a switch, pencil or dropdown. - The source chooser gets its own layer -- `chooser_sources` (a new heading above the saved-source list) and `chooser_waveform` (the waveforms action row) -- built with the one `context_help_button()` both windows use and re-synced by its Help menu's toggle. The form's `AdwEntryRow`s cannot host a sibling hint, so none is invented for the host/port fields. - The tour is one implementation over two windows: `ui_impl::TourView` plus a list of `TourStop`s; each window keeps its own table. A walk that passes its last stop calls `on_done`, and the chooser's sets `Config::tour_pending`, so a first run is one tour that crosses from the chooser into the app. The chooser's tour auto-starts from `settings.tour_seen` exactly as the window's does, and its "Guided tour" row now starts *it* instead of only requesting the window's. - Probes: `UDPSCOPE_PROBE_CHOOSER_TOUR=1` / `UDPSCOPE_PROBE_CHOOSER_TOUR_MS`, the hint size in the `help layer:`/`[helpui] contextual on:` lines, and the chooser's hints in its `chooser ui:` line. Docs updated in invariants-gtk-and-chrome.md, probe-readings.md and verification.md.
This commit is contained in:
1 parent
395c9caec3
commit
829176248a
14 files changed
+911
-303
No files matched your search
+10
-6
@@ -4565,11 +4565,11 @@ void helpui_report_geometry(App& a, const char* what) {
|
||||
graphene_rect_t card = GRAPHENE_RECT_INIT(0, 0, 0, 0);
|
||||
GtkWidget* t = tour_target(a);
|
||||
const bool have_spot =
|
||||
a.tour_spot != nullptr && gtk_widget_compute_bounds(a.tour_spot, a.window, &spot);
|
||||
a.tour.spot != nullptr && gtk_widget_compute_bounds(a.tour.spot, a.window, &spot);
|
||||
const bool have_target = t != nullptr && gtk_widget_is_visible(t) &&
|
||||
gtk_widget_compute_bounds(t, a.window, &target);
|
||||
const bool have_card =
|
||||
a.tour_card != nullptr && gtk_widget_compute_bounds(a.tour_card, a.window, &card);
|
||||
a.tour.card != nullptr && gtk_widget_compute_bounds(a.tour.card, a.window, &card);
|
||||
const auto contains = [](const graphene_rect_t& outer, const graphene_rect_t& inner) {
|
||||
return outer.origin.x <= inner.origin.x + 0.5 && outer.origin.y <= inner.origin.y + 0.5 &&
|
||||
outer.origin.x + outer.size.width >= inner.origin.x + inner.size.width - 0.5 &&
|
||||
@@ -4607,7 +4607,11 @@ gboolean helpui_probe_step(gpointer user) {
|
||||
if (tour_active(*a)) tour_dismiss(*a);
|
||||
std::string ids;
|
||||
const int hints = context_help_count(*a, &ids);
|
||||
std::fprintf(stderr, "[helpui] contextual on: hints=%d ids={%s}\n", hints, ids.c_str());
|
||||
int hint_w = 0;
|
||||
int hint_h = 0;
|
||||
context_help_size(*a, &hint_w, &hint_h);
|
||||
std::fprintf(stderr, "[helpui] contextual on: hints=%d ids={%s} hint=%dx%d\n", hints,
|
||||
ids.c_str(), hint_w, hint_h);
|
||||
int total = 0;
|
||||
int clicks = 0;
|
||||
helpui_count_controllers(a, &total, &clicks);
|
||||
@@ -4736,11 +4740,11 @@ gboolean helpui_probe_step(gpointer user) {
|
||||
"[helpui] after Skip: visible=%d dims_hidden=%d spot_hidden=%d card_hidden=%d "
|
||||
"controllers=%d (was %d) click_gestures=%d\n",
|
||||
tour_active(*a) ? 1 : 0,
|
||||
hidden(a->tour_dim[0]) && hidden(a->tour_dim[1]) && hidden(a->tour_dim[2]) &&
|
||||
hidden(a->tour_dim[3])
|
||||
hidden(a->tour.dim[0]) && hidden(a->tour.dim[1]) && hidden(a->tour.dim[2]) &&
|
||||
hidden(a->tour.dim[3])
|
||||
? 1
|
||||
: 0,
|
||||
hidden(a->tour_spot) ? 1 : 0, hidden(a->tour_card) ? 1 : 0, total,
|
||||
hidden(a->tour.spot) ? 1 : 0, hidden(a->tour.card) ? 1 : 0, total,
|
||||
a->dbg_helpui_controllers, clicks);
|
||||
capture_help_state(*a);
|
||||
std::fprintf(stderr, "[helpui] layer: %s\n", a->dbg_context_help.c_str());
|
||||
|
||||
Reference in new issue
Block a user