[gnome-music/gnome-3-14] widgets: Request same width on artist album covers
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/gnome-3-14] widgets: Request same width on artist album covers
- Date: Mon, 24 Nov 2014 11:50:45 +0000 (UTC)
commit 581c2e34329cc740df7215daf59312dea07bddd0
Author: Arnel Borja <arnelborja src gnome org>
Date: Sat Nov 22 17:54:20 2014 +0800
widgets: Request same width on artist album covers
https://bugzilla.gnome.org/show_bug.cgi?id=731639
gnomemusic/widgets.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/widgets.py b/gnomemusic/widgets.py
index bf11a38..939c6c8 100644
--- a/gnomemusic/widgets.py
+++ b/gnomemusic/widgets.py
@@ -349,6 +349,7 @@ class ArtistAlbums(Gtk.VBox):
self._hbox.pack_start(self.ui.get_object('ArtistAlbumsWidget'),
False, False, 0)
self._hbox.pack_start(self._albumBox, False, False, 16)
+ self._coverSizeGroup = Gtk.SizeGroup.new(Gtk.SizeGroupMode.HORIZONTAL)
self.pack_start(self._scrolledWindow, True, True, 0)
for album in albums:
@@ -363,6 +364,7 @@ class ArtistAlbums(Gtk.VBox):
self.artist, album, self.player, self.model,
self.header_bar, self.selectionModeAllowed
)
+ self._coverSizeGroup.add_widget(widget.cover)
self._albumBox.pack_start(widget, False, False, 0)
self.widgets.append(widget)
@@ -484,7 +486,8 @@ class ArtistAlbumWidget(Gtk.HBox):
GLib.idle_add(self._update_album_art)
- self.ui.get_object('cover').set_from_pixbuf(self.pixbuf)
+ self.cover = self.ui.get_object('cover')
+ self.cover.set_from_pixbuf(self.pixbuf)
self.ui.get_object('title').set_label(album.get_title())
if album.get_creation_date():
self.ui.get_object('year').set_markup(
@@ -565,7 +568,7 @@ class ArtistAlbumWidget(Gtk.HBox):
@log
def _get_album_cover(self, pixbuf, path, data=None):
if pixbuf:
- self.ui.get_object('cover').set_from_pixbuf(pixbuf)
+ self.cover.set_from_pixbuf(pixbuf)
@log
def track_selected(self, widget, event):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]