summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrien Plazas <kekun.plazas@laposte.net>2018-12-05 08:32:11 +0100
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2018-12-11 12:43:08 +0000
commit271c72ca1957b670081ccf98cda3aa58b46dd0db (patch)
tree487de8e0aa2aa633672e80f550c1b08f6c34b179
parent2a76533e66851ee3b79353fdefbd394ba8cf807b (diff)
downloadgnome-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.c3
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");