[libwnck/wip/muktupavels/gtk4: 103/109] tasklist: remove expand, fill and padding from gtk_box_pack_start




commit 1727874019fb817ef73898a10cbebde287322dab
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun May 21 02:18:47 2017 +0300

    tasklist: remove expand, fill and padding from gtk_box_pack_start

 libwnck/tasklist.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/libwnck/tasklist.c b/libwnck/tasklist.c
index bfae653..5660020 100644
--- a/libwnck/tasklist.c
+++ b/libwnck/tasklist.c
@@ -581,18 +581,14 @@ wnck_button_init (WnckButton *self)
   gtk_widget_show (box);
 
   self->image = gtk_image_new ();
-  gtk_box_pack_start (GTK_BOX (box),
-                      self->image,
-                      FALSE,
-                      FALSE,
-                      TASKLIST_BUTTON_PADDING);
+  gtk_box_pack_start (GTK_BOX (box), self->image);
+  g_object_set (self->image, "margin", TASKLIST_BUTTON_PADDING, NULL);
 
   self->label = gtk_label_new (NULL);
-  gtk_box_pack_start (GTK_BOX (box),
-                      self->label,
-                      TRUE,
-                      TRUE,
-                      TASKLIST_BUTTON_PADDING);
+  gtk_box_pack_start (GTK_BOX (box), self->label);
+  gtk_widget_set_hexpand (self->label, TRUE);
+  gtk_widget_set_valign (self->label, GTK_ALIGN_FILL);
+  g_object_set (self->label, "margin", TASKLIST_BUTTON_PADDING, NULL);
 
   gtk_label_set_xalign (GTK_LABEL (self->label), 0.0);
   gtk_label_set_ellipsize (GTK_LABEL (self->label), PANGO_ELLIPSIZE_END);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]