Skip to content

network-connection-editor: Align Routes labels

Even though the routes_metric_label is in a GtkSizeGroup with the GtkEntry for the metric, its size was set too big after adding the entry to the size group. To fix this, add all the other labels and corresponding entries to size groups as well. The hexpand can then be removed as well on the labels.

Fixes #1235 (closed)

Before
Screenshot_from_2023-10-18_22-29-46

After
Screenshot_from_2023-10-18_22-29-20

Comments
Now, I don't actually completely understand why this is needed. The "Metric" label is actually widened because of the gtk_size_group_add_widget (self->routes_metric_sizegroup, widget); call, even though it is first narrower than the entry. If someone can explain why that goes wrong, I would love to understand better :)

The other solution would be to add the three longer entries and their labels all to one GtkSizeGroup. That would mean they are all equally long, which might be a problem if there are languages with long translations?

Merge request reports