Skip to content

Commit

Permalink
Use better icons for love/ban/tired
Browse files Browse the repository at this point in the history
This also moves away from stockicons to standard named icons.
The love icon is now a heart that looks better across themes
like on KDE.

Closes #169
  • Loading branch information
TingPing committed Apr 4, 2015
1 parent cf286bb commit 8246988
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions pithos/pithos.py
Expand Up @@ -112,8 +112,7 @@ def do_render(self, ctx, widget, background_area, cell_area, flags):
Gdk.cairo_set_source_pixbuf(ctx, self.rate_bg, x, y)
ctx.paint()

icon = widget.get_style_context().lookup_icon_set(self.icon)
pixbuf = icon.render_icon_pixbuf(widget.get_style_context(), Gtk.IconSize.MENU)
pixbuf = Gtk.IconTheme.get_default().load_icon(self.icon, Gtk.IconSize.MENU, 0)
x = cell_area.x+(cell_area.width-pixbuf.get_width())-5 - ALBUM_ART_X_PAD # right
y = cell_area.y+(cell_area.height-pixbuf.get_height())-5 # bottom
Gdk.cairo_set_source_pixbuf(ctx, pixbuf, x, y)
Expand Down Expand Up @@ -833,11 +832,11 @@ def song_text(self, song):

def song_icon(self, song):
if song.tired:
return Gtk.STOCK_JUMP_TO
return 'go-jump'
if song.rating == RATE_LOVE:
return Gtk.STOCK_ABOUT
return 'emblem-favorite'
if song.rating == RATE_BAN:
return Gtk.STOCK_CANCEL
return 'dialog-error'

def update_song_row(self, song = None):
if song is None:
Expand Down

0 comments on commit 8246988

Please sign in to comment.