[rhythmbox] button-bar: fix layout when additional items are added



commit e78ff215396c63245b5257174b3c700d1bf56084
Author: Jonathan Matthew <jonathan d14n org>
Date:   Thu May 22 09:03:25 2014 +1000

    button-bar: fix layout when additional items are added
    
    Remove the extra label added to take up unused space, and set margins on
    separators to space things out a bit better.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=730547

 widgets/rb-button-bar.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/widgets/rb-button-bar.c b/widgets/rb-button-bar.c
index 6bf73d2..3ca0ebb 100644
--- a/widgets/rb-button-bar.c
+++ b/widgets/rb-button-bar.c
@@ -77,10 +77,8 @@ clear_button_bar (RBButtonBar *bar)
 
        c = gtk_container_get_children (GTK_CONTAINER (bar));
        for (l = c; l != NULL; l = l->next) {
-               if (GTK_IS_LABEL (l->data))
-                       continue;
-
-               gtk_size_group_remove_widget (bar->priv->size_group, l->data);
+               if (!GTK_IS_LABEL (l->data))
+                       gtk_size_group_remove_widget (bar->priv->size_group, l->data);
                gtk_container_remove (GTK_CONTAINER (bar), l->data);
        }
        g_list_free (c);
@@ -136,6 +134,7 @@ append_menu (RBButtonBar *bar, GMenuModel *menu, gboolean need_separator)
                        if (bar->priv->position > 0) {
                                sep = gtk_separator_new (GTK_ORIENTATION_VERTICAL);
                                gtk_widget_show (sep);
+                               g_object_set (sep, "margin-start", 6, "margin-end", 6, NULL);
                                gtk_grid_attach (GTK_GRID (bar), sep, bar->priv->position++, 0, 1, 1);
                        }
 


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