[network-manager-applet/lr/ui-improvements: 6/18] applet: don't let the separators expand vertically
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/lr/ui-improvements: 6/18] applet: don't let the separators expand vertically
- Date: Tue, 27 Jun 2017 09:37:47 +0000 (UTC)
commit 994a54eb7c6ad4e2aee439b68fefa5f4098057d4
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Fri Jun 23 16:55:33 2017 +0200
applet: don't let the separators expand vertically
It's so ugly it's offensive.
src/applet.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/applet.c b/src/applet.c
index 5b74a7f..322e0e9 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]