diff options
author | Adrien Plazas <kekun.plazas@laposte.net> | 2018-12-05 08:32:11 +0100 |
---|---|---|
committer | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2018-12-11 12:43:08 +0000 |
commit | 271c72ca1957b670081ccf98cda3aa58b46dd0db (patch) | |
tree | 487de8e0aa2aa633672e80f550c1b08f6c34b179 | |
parent | 2a76533e66851ee3b79353fdefbd394ba8cf807b (diff) | |
download | gnome-control-center-271c72ca1957b670081ccf98cda3aa58b46dd0db.tar.gz |
connection-editor: Improve VPN selection
Make the names ellipsizable to allow the dialog to reach narrower sizes
and align the labels at the start so they remain aligned regardless the
size of the dialog.
-rw-r--r-- | panels/network/connection-editor/net-connection-editor.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/panels/network/connection-editor/net-connection-editor.c b/panels/network/connection-editor/net-connection-editor.c index 609556b8d..d60382bf3 100644 --- a/panels/network/connection-editor/net-connection-editor.c +++ b/panels/network/connection-editor/net-connection-editor.c @@ -691,12 +691,15 @@ select_vpn_type (NetConnectionEditor *editor, GtkListBox *list) gtk_widget_set_margin_bottom (row_box, 12); name_label = gtk_label_new (name); + gtk_label_set_ellipsize (GTK_LABEL (name_label), PANGO_ELLIPSIZE_END); + gtk_label_set_xalign (GTK_LABEL (name_label), 0.0f); gtk_widget_set_halign (name_label, GTK_ALIGN_START); gtk_box_pack_start (GTK_BOX (row_box), name_label, FALSE, TRUE, 0); desc_label = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (desc_label), desc_markup); gtk_label_set_line_wrap (GTK_LABEL (desc_label), TRUE); + gtk_label_set_xalign (GTK_LABEL (desc_label), 0.0f); gtk_widget_set_halign (desc_label, GTK_ALIGN_START); context = gtk_widget_get_style_context (desc_label); gtk_style_context_add_class (context, "dim-label"); |