ui: a badge bar with a Trigger badge, and the trigger form in the slide-over

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Martino FerrariandClaude Opus 4.6 committed 2026-11-02 20:12:16 +01:00
1 parent a40863fa45
commit 5fb479bd69
9 files changed
+215 -7

No files matched your search

+10 -1
View File
@@ -195,7 +195,8 @@ gboolean exit_probe_step3(gpointer user) {
const int on_signals = page != nullptr && std::strcmp(page, "signals") == 0 ? 1 : 0;
a->dbg_signal_page_current =
on_signals && gtk_widget_get_first_child(a->signal_list) != nullptr ? 1 : 0;
a->dbg_trigger_sensitive = on_signals && gtk_widget_get_sensitive(a->trigger_body) ? 1 : 0;
// The trigger form is no longer on a sidebar tab, so the reading is the body's own sensitivity.
a->dbg_trigger_sensitive = gtk_widget_get_sensitive(a->trigger_body) ? 1 : 0;
// `gtk_widget_get_visible` on the sidebar's GtkBox is always 1: AdwOverlaySplitView hides its
// sidebar child via `gtk_widget_set_child_visible()`, not `gtk_widget_set_visible()`. The useful
// reading is whether the split view is currently showing the sidebar panel.
@@ -212,6 +213,7 @@ gboolean exit_probe_step3(gpointer user) {
}
// `dbg_window_text` is kept by `sync_window_display()`, the only place that knows the span the
// window control is showing: there is no label to read it back from any more.
slideover_close(*a); // opened by step 1 for the allocations read above
if (window != nullptr) gtk_window_destroy(GTK_WINDOW(window));
return G_SOURCE_REMOVE;
}
@@ -4030,6 +4032,9 @@ gboolean force_probe(gpointer user) {
// trigger, so a second run against the same source would otherwise start armed and never read the
// off case at all.
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(a->trigger_toggle), FALSE);
// The buttons' widths are allocations, and the trigger form is a slide-over page: open it, and step 2
// reads 300 ms later, past the 120 ms reveal.
slideover_open(*a, "trigger");
g_timeout_add(300, force_probe_step2, a);
return G_SOURCE_REMOVE;
}
@@ -4178,6 +4183,10 @@ gboolean export_probe(gpointer user) {
gboolean exit_probe_step1(gpointer user) {
App* a = static_cast<App*>(user);
// The trigger form is a slide-over page now, and a page that is not the open one has no allocation:
// open it here, and the chain below reads its widgets 2.1 s later, long after the 120 ms reveal. Step 3
// closes it again. Sensitivity, visibility and values need no open page; widths and heights do.
slideover_open(*a, "trigger");
// Record the panel states before the toggles are exercised.
a->dbg_trigger_sensitive_default = gtk_widget_get_sensitive(a->trigger_body) ? 1 : 0;
// The two [edit] buttons, in each mode: the icon is the only thing that says which mode the pane is