ui: the signals panel's frame is a .ui file
src/ui/signals-panel.ui holds the panel's shape: the box and its margins, the heading, the hint that says what a signal is for, and the list. The rows stay in code -- one per signal, carrying that signal's switch, colour, calibration and drop targets, rebuilt whenever the stream's signals change -- so the file holds the frame, which is the shape the plan gives this slice. The list's width-only size request moved with it, comment and all: a height floor there made the list occupy 120 px whatever it held, which hid the compact rows' height behind it. Read back by a new dump line, `signals panel: labels=2 list=1`, where a lost id reads as `labels=1` or `list=0` instead of a panel quietly missing its hint; `panels: … row_h=26` still reads the list's geometry and the height a row takes. check_ui is at 10 ok.
This commit is contained in:
1 parent
1ccc70c5ac
commit
c37fbdde21
6 files changed
+88
-22
No files matched your search
+14
@@ -5409,6 +5409,20 @@ int run_ui(int argc, char** argv, const Config& cfg, ScopeModel& model, Acquisit
|
||||
static_cast<unsigned long long>(model.trigger_latches().load()),
|
||||
static_cast<unsigned long long>(app.dbg_latches_at_disarm));
|
||||
std::printf("[udpscope] window control: '%s'\n", app.dbg_window_text.c_str());
|
||||
{
|
||||
// The signals panel's frame, read from the window rather than from the `.ui`: the two labels and the
|
||||
// list the file gives it. A `.ui` that lost one of them reads here -- `labels=1` or `list=0` -- rather
|
||||
// than showing as a panel quietly missing its hint.
|
||||
GtkWidget* panel = app.signal_list != nullptr ? gtk_widget_get_parent(app.signal_list) : nullptr;
|
||||
int labels = 0;
|
||||
int lists = 0;
|
||||
for (GtkWidget* c = panel != nullptr ? gtk_widget_get_first_child(panel) : nullptr; c != nullptr;
|
||||
c = gtk_widget_get_next_sibling(c)) {
|
||||
if (GTK_IS_LABEL(c)) ++labels;
|
||||
if (GTK_IS_LIST_BOX(c)) ++lists;
|
||||
}
|
||||
std::printf("[udpscope] signals panel: labels=%d list=%d\n", labels, lists);
|
||||
}
|
||||
std::printf("[udpscope] panels: side=%dx%d (visible=%d) signals=%dx%d row_h=%d "
|
||||
"(revealed=%d) trigger=%dx%d (revealed=%d) toggles=%d cursors=%d window=%.3fs "
|
||||
"window_cap=%.1fs\n",
|
||||
|
||||
Reference in new issue
Block a user