From c0316303792fbcb8ae97855b9cc008d929bec995 Mon Sep 17 00:00:00 2001 From: coderkun Date: Sat, 11 Jun 2016 13:15:20 +0200 Subject: [PATCH] move labels on cover panel to the right and use CSS for styling --- data/gtk.glade | 168 ++++++++++++++++++++++++------------------------- data/mcg.css | 7 +++ mcg/mcgGtk.py | 20 +++--- 3 files changed, 98 insertions(+), 97 deletions(-) diff --git a/data/gtk.glade b/data/gtk.glade index 562f483..fcbd62d 100644 --- a/data/gtk.glade +++ b/data/gtk.glade @@ -408,60 +408,112 @@ True False - vertical + True - + True False - True - + True False + + + cover-spinner + + + + + True + True + False + False + - + True False - - - cover-spinner - - - - - True - True - False - False - - + True False - + True False - - - True - False - gtk-missing-image - - + gtk-missing-image - - cover-scroll - 1 - - True + cover-scroll + 1 + + + + + True + True + 0 + + + + + True + False + vertical + + + True + False + 5 + 5 + 5 + True + True + + + True + False + Album + + + 0 + 0 + + + + + True + False + Date + + + 0 + 1 + + + + + True + False + Artist + + + 0 + 2 + + + + + + False True 10 0 @@ -473,7 +525,6 @@ True start vertical - 1 False @@ -481,66 +532,15 @@ True True - 10 - end 1 - - True - True - 10 - 0 - - - - - True - False - 5 - 5 - 5 - True - True - - - True - False - Album - - - 0 - 0 - - - - - True - False - Date - - - 0 - 1 - - - - - True - False - Artist - - - 0 - 2 - - - False True 10 + end 1 diff --git a/data/mcg.css b/data/mcg.css index df42fb1..13d4fa8 100644 --- a/data/mcg.css +++ b/data/mcg.css @@ -11,6 +11,13 @@ border:none; } +.cover-labels label { + font-size:larger; +} +.cover-labels label:first-child { + font-weight:bold; +} + iconview.view:selected, iconview.view:selected:focus, GtkIconView.cell:selected, diff --git a/mcg/mcgGtk.py b/mcg/mcgGtk.py index 7f74b20..acc9155 100755 --- a/mcg/mcgGtk.py +++ b/mcg/mcgGtk.py @@ -816,25 +816,19 @@ class CoverPanel(mcg.Base): def set_album(self, album): # Set labels - self._album_title_label.set_markup( - "{}".format( - GObject.markup_escape_text( - album.get_title() - ) + self._album_title_label.set_label( + GObject.markup_escape_text( + album.get_title() ) ) self._album_date_label.set_markup( - "{}".format( - GObject.markup_escape_text( - ', '.join(album.get_dates()) - ) + GObject.markup_escape_text( + ', '.join(album.get_dates()) ) ) self._album_artist_label.set_markup( - "{}".format( - GObject.markup_escape_text( - ', '.join(album.get_artists()) - ) + GObject.markup_escape_text( + ', '.join(album.get_artists()) ) )