diff --git a/data/ui/cover-panel.ui b/data/ui/cover-panel.ui index 75c8530..d869e76 100644 --- a/data/ui/cover-panel.ui +++ b/data/ui/cover-panel.ui @@ -141,6 +141,7 @@ vertical + start fill true False @@ -158,4 +159,3 @@ - diff --git a/src/coverpanel.py b/src/coverpanel.py index ba09e16..2bcafa3 100644 --- a/src/coverpanel.py +++ b/src/coverpanel.py @@ -180,6 +180,27 @@ class CoverPanel(Gtk.Overlay): length, Gtk.PositionType.RIGHT, "{0[0]:02d}:{0[1]:02d} minutes".format(divmod(length, 60))) + # Align marks + self._align_songs_scale_marks() + + def _align_songs_scale_marks(self): + self._align_songs_scale_mark(self.songs_scale) + + def _align_songs_scale_mark(self, widget): + child = widget.get_first_child() + while child: + if type(child) is Gtk.Label: + print("label found:", child.get_label()) + child.set_halign(Gtk.Align.START) + else: + self._align_songs_scale_mark(child) + child = child.get_next_sibling() + + def test_child(self, widget): + if type(widget) is Gtk.Label: + print("label found:", widget.get_label()) + widget.set_halign(Gtk.Align.START) + def _enable_tracklist(self): if self._current_album: # enable