[gnome-music] albumwidget: Line up the widgets properly



commit c769fb73fc6e50ab3a5983340a38f1f0d3ea2524
Author: Marinus Schraal <mschraal src gnome org>
Date:   Wed Nov 2 14:34:11 2016 +0100

    albumwidget: Line up the widgets properly
    
    The DiscBox has a top margin to get spacing in between possible album
    discs, but this messes with lining out the top of the coverart with the
    top of the album song entries. Fix this by manually subtracting the
    DiscBox top margin from the ListBox top margin for now.

 gnomemusic/widgets/albumwidget.py |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/widgets/albumwidget.py b/gnomemusic/widgets/albumwidget.py
index 0b7c035..1a16543 100644
--- a/gnomemusic/widgets/albumwidget.py
+++ b/gnomemusic/widgets/albumwidget.py
@@ -84,7 +84,12 @@ class AlbumWidget(Gtk.EventBox):
         view_box = self._builder.get_object('view')
         self._disc_listbox = DiscListBox()
         self._disc_listbox.set_selection_mode_allowed(True)
-        self._disc_listbox.set_margin_top(64)
+        # TODO: The top of the coverart is the same vertical
+        # position as the top of the album songs, however
+        # since we set a top margins for the discbox
+        # subtract that margin here. A cleaner solution is
+        # appreciated.
+        self._disc_listbox.set_margin_top(64 - 16)
         self._disc_listbox.set_margin_bottom(64)
         self._disc_listbox.set_margin_end(32)
         self._disc_listbox.connect('selection-changed',


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