Feature/source plugins #1

Merged
martino merged 130 commits from feature/source-plugins into main 2026-11-04 07:35:21 +01:00
Showing only changes of commit c15c89c00a - Show all commits
+3 -4
View File
@@ -131,16 +131,15 @@ GtkWidget* build_info_grid(App& app, std::size_t index, const SignalInfo& sig,
GtkWidget* name_label = gtk_label_new(row.label);
gtk_widget_set_halign(name_label, GTK_ALIGN_START);
gtk_grid_attach(GTK_GRID(grid), name_label, 0, r, 1, 1);
// An editable value sits against its label with the pencil right after it; a read-only one is pushed to
// the right edge, so the two kinds read as two columns.
// Every value is pushed to the right edge; an editable one carries its pencil right after it.
const bool editable = row.edit >= 0;
GtkWidget* cell = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 6);
gtk_widget_set_hexpand(cell, true);
gtk_widget_set_halign(cell, editable ? GTK_ALIGN_START : GTK_ALIGN_END);
gtk_widget_set_halign(cell, GTK_ALIGN_END);
GtkWidget* value = gtk_label_new(row.value.c_str());
gtk_widget_add_css_class(value, "numeric");
if (row.id != nullptr) gtk_widget_set_name(value, row.id);
gtk_label_set_xalign(GTK_LABEL(value), editable ? 0.0f : 1.0f);
gtk_label_set_xalign(GTK_LABEL(value), 1.0f);
gtk_label_set_wrap(GTK_LABEL(value), !editable);
gtk_box_append(GTK_BOX(cell), value);
if (!row.unit.empty()) {