diff options
Diffstat (limited to 'gnomemusic/widgets/albumcover.py')
-rw-r--r-- | gnomemusic/widgets/albumcover.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gnomemusic/widgets/albumcover.py b/gnomemusic/widgets/albumcover.py index ec51de65..b7755246 100644 --- a/gnomemusic/widgets/albumcover.py +++ b/gnomemusic/widgets/albumcover.py @@ -26,9 +26,9 @@ import gi gi.require_version('Grl', '0.3') from gi.repository import GObject, Gtk -from gnomemusic.defaulticon import DefaultIcon from gnomemusic.corealbum import CoreAlbum -from gnomemusic.utils import ArtSize +from gnomemusic.coverpaintable import CoverPaintable +from gnomemusic.utils import ArtSize, DefaultIconType from gnomemusic.widgets.twolinetip import TwoLineTip @@ -41,8 +41,8 @@ class AlbumCover(Gtk.FlowBoxChild): __gtype_name__ = 'AlbumCover' - _art_stack = Gtk.Template.Child() _check = Gtk.Template.Child() + _cover_image = Gtk.Template.Child() _title_label = Gtk.Template.Child() _artist_label = Gtk.Template.Child() @@ -82,10 +82,10 @@ class AlbumCover(Gtk.FlowBoxChild): self.connect('query-tooltip', self._on_tooltip_query) - self._art_stack.props.size = ArtSize.MEDIUM - self._art_stack.props.art_type = DefaultIcon.Type.ALBUM - - self.show() + self._cover_image.set_size_request( + ArtSize.MEDIUM.width, ArtSize.MEDIUM.height) + self._cover_image.props.paintable = CoverPaintable( + self, ArtSize.MEDIUM, DefaultIconType.ALBUM) def retrieve(self): """Start retrieving the actual album cover @@ -97,7 +97,7 @@ class AlbumCover(Gtk.FlowBoxChild): return self._retrieved = True - self._art_stack.props.coreobject = self._corealbum + self._cover_image.props.paintable.props.coreobject = self._corealbum @GObject.Property(type=CoreAlbum, flags=GObject.ParamFlags.READABLE) def corealbum(self): |