help: the search block's (i) on its header, a 12 px mark, and a real search page
This commit is contained in:
1 parent
d549223889
commit
fe499bfe41
10 files changed
+178
-53
No files matched your search
@@ -4773,6 +4773,24 @@ gboolean helpui_probe_step(gpointer user) {
|
||||
helpui_probe_next(*a, 8, 400);
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
// The search block's "(i)" rides the expander's *header* box, which is in the widget tree and on
|
||||
// screen while the block is collapsed -- unlike the expander's child, which is out of the
|
||||
// widget-parent chain until it is expanded (see the invariant). Read here, in config mode with the
|
||||
// pane and the sidebar up and the block still collapsed: `mapped=1` and a real size *on a collapsed
|
||||
// expander* is the whole point, and a hint hung on the child would read 0x0 here.
|
||||
if (a->trigger_search != nullptr) {
|
||||
GtkWidget* hint = gtk_widget_get_last_child(a->trigger_search);
|
||||
int sw = 0;
|
||||
int sh = 0;
|
||||
context_help_size_in(hint, &sw, &sh);
|
||||
std::fprintf(stderr,
|
||||
"[helpui] collapsed search: expanded=%d mapped=%d mapped_header=%d hint=%dx%d\n",
|
||||
a->search_exp != nullptr && gtk_expander_get_expanded(GTK_EXPANDER(a->search_exp))
|
||||
? 1
|
||||
: 0,
|
||||
hint != nullptr && gtk_widget_get_mapped(hint) ? 1 : 0,
|
||||
gtk_widget_get_mapped(a->trigger_search) ? 1 : 0, sw, sh);
|
||||
}
|
||||
std::fflush(stderr);
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user