Commit 65c70cbc authored by Marinus Schraal's avatar Marinus Schraal

artistalbumwidget: Pass cover size group as argument

In line with the other size group, pass it as argument to the widget.
parent 9fd4ddb8
......@@ -111,11 +111,10 @@ class ArtistAlbumsWidget(Gtk.Box):
@log
def add_album(self, album, is_last_album=False):
widget = ArtistAlbumWidget(
album, self.player, self._model,
self.header_bar, self.selectionModeAllowed,
self._songsGridSizeGroup, self.header_bar
)
widget = ArtistAlbumWidget(album, self.player, self._model,
self.header_bar, self.selectionModeAllowed,
self._songsGridSizeGroup,
self._coverSizeGroup, self.header_bar)
self._coverSizeGroup.add_widget(widget.cover)
self._albumBox.pack_start(widget, False, False, 0)
......
......@@ -44,10 +44,11 @@ class ArtistAlbumWidget(Gtk.Box):
@log
def __init__(self, media, player, model, header_bar,
selection_mode_allowed, size_group=None,
selection_toolbar = None):
cover_size_group=None, selection_toolbar=None):
super().__init__(self, orientation=Gtk.Orientation.HORIZONTAL)
self._size_group = size_group
self._cover_size_group = cover_size_group
scale = self.get_scale_factor()
self._cache = AlbumArtCache(scale)
self._loading_icon_surface = DefaultIcon(scale).get(
......@@ -87,6 +88,9 @@ class ArtistAlbumWidget(Gtk.Box):
if self._size_group:
self._size_group.add_widget(ui.get_object('box1'))
if self._cover_size_group:
self._cover_size_group.add_widget(self.cover)
self.pack_start(ui.get_object('ArtistAlbumWidget'), True, True, 0)
GLib.idle_add(self._update_album_art)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment