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
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- SPDX-License-Identifier: MIT -->
|
||||
<!-- SPDX-FileCopyrightText: 2026 Martino Ferrari -->
|
||||
<!--
|
||||
The signals panel: a heading, the hint that says what a signal is for, and the list they go in.
|
||||
|
||||
The rows are not here. There is one per signal in the stream, it carries the switch that decides whether
|
||||
that signal is acquired, its colour, its calibration and its drop targets, and the whole list is rebuilt
|
||||
whenever the stream's signals change — so the file holds the frame and the code holds the rows.
|
||||
|
||||
The list's size request is **width only**, deliberately. A height floor here made the list occupy 120 px
|
||||
whatever it held, which hid the compact rows' height behind it and wasted the space on an empty stream;
|
||||
the scroller this panel sits in already caps how tall it can grow.
|
||||
-->
|
||||
<interface>
|
||||
<object class="GtkBox" id="signal_panel">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="margin-top">8</property>
|
||||
<property name="margin-bottom">8</property>
|
||||
<property name="margin-start">8</property>
|
||||
<property name="margin-end">8</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="signals_heading">
|
||||
<property name="label" translatable="yes">Signals</property>
|
||||
<property name="halign">start</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="signals_hint">
|
||||
<property name="label" translatable="yes">drag a signal onto a plot</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="css-classes">dim-label</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBox" id="signal_list">
|
||||
<property name="selection-mode">none</property>
|
||||
<property name="width-request">260</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -18,5 +18,6 @@
|
||||
<file preprocess="xml-stripblanks">cursors-panel.ui</file>
|
||||
<file preprocess="xml-stripblanks">measures-panel.ui</file>
|
||||
<file preprocess="xml-stripblanks">trigger-panel.ui</file>
|
||||
<file preprocess="xml-stripblanks">signals-panel.ui</file>
|
||||
</gresource>
|
||||
</gresources>
|
||||
Reference in new issue
Block a user