diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2017-06-23 16:55:33 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2017-07-11 17:51:04 +0200 |
commit | 556006bf0fe7b2a1c035835e3b8597a2778e54f7 (patch) | |
tree | 4f2630b3383244ea0ab004444d1f70acf364c280 | |
parent | a2b87440d634ff1d2914f9a796f04c47ea01fe1a (diff) | |
download | network-manager-applet-556006bf0fe7b2a1c035835e3b8597a2778e54f7.tar.gz |
applet: don't let the separators expand vertically
It's so ugly it's offensive.
-rw-r--r-- | src/applet.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/applet.c b/src/applet.c index 5b74a7ff..322e0e91 100644 --- a/src/applet.c +++ b/src/applet.c @@ -535,7 +535,7 @@ applet_menu_item_add_complex_separator_helper (GtkWidget *menu, NMApplet *applet, const gchar *label) { - GtkWidget *menu_item, *box, *xlabel; + GtkWidget *menu_item, *box, *xlabel, *separator; if (INDICATOR_ENABLED (applet)) { /* Indicator doesn't draw complex separators */ @@ -549,11 +549,16 @@ applet_menu_item_add_complex_separator_helper (GtkWidget *menu, xlabel = gtk_label_new (NULL); gtk_label_set_markup (GTK_LABEL (xlabel), label); - gtk_box_pack_start (GTK_BOX (box), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL), TRUE, TRUE, 0); + separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL); + g_object_set (G_OBJECT (separator), "valign", GTK_ALIGN_CENTER, NULL); + gtk_box_pack_start (GTK_BOX (box), separator, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (box), xlabel, FALSE, FALSE, 2); } - gtk_box_pack_start (GTK_BOX (box), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL), TRUE, TRUE, 0); + separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL); + g_object_set (G_OBJECT (separator), "valign", GTK_ALIGN_CENTER, NULL); + gtk_box_pack_start (GTK_BOX (box), separator, TRUE, TRUE, 0); g_object_set (G_OBJECT (menu_item), "child", box, |