[gnome-music] patch for ui fix in artistalbums.



commit 23f4fc7ecb182eaaa846f80cb064df3d40d43f85
Author: Sai <suman sai14 gmail com>
Date:   Wed Jul 17 16:31:06 2013 +0530

    patch for ui fix in artistalbums.
    
        deleted:    data/Unsaved 1.glade
    
    https://bugzilla.gnome.org/show_bug.cgi?id=704254

 data/ArtistAlbumWidget.ui |    2 +-
 data/application.css      |    6 ++++++
 src/widgets.js            |   16 ++++++++++------
 3 files changed, 17 insertions(+), 7 deletions(-)
---
diff --git a/data/ArtistAlbumWidget.ui b/data/ArtistAlbumWidget.ui
index f6c4115..34b0ab5 100644
--- a/data/ArtistAlbumWidget.ui
+++ b/data/ArtistAlbumWidget.ui
@@ -13,7 +13,7 @@
       <packing>
         <property name="expand">False</property>
         <property name="fill">True</property>
-        <property name="padding">24</property>
+        <property name="padding">0</property>
         <property name="position">0</property>
       </packing>
     </child>
diff --git a/data/application.css b/data/application.css
index 0642bcd..96b56b4 100644
--- a/data/application.css
+++ b/data/application.css
@@ -12,6 +12,12 @@
 @define-color music_selection_button_dark_b #1c1c1c;
 @define-color music_selection_box_dark_border #3e7b05;
 
+.cover{
+    padding-left:24px;
+}
+.title{
+    padding-left:24px;
+}
 .artist-panel-white{
     background-color: #d7dad7;
 }
diff --git a/src/widgets.js b/src/widgets.js
index 4a07d88..cd87866 100644
--- a/src/widgets.js
+++ b/src/widgets.js
@@ -550,9 +550,12 @@ const ArtistAlbumWidget = new Lang.Class({
 
         let pixbuf = albumArtCache.makeDefaultIcon(128, 128);
         GLib.idle_add(300, Lang.bind(this, this._updateAlbumArt));
-
-        this.ui.get_object("cover").set_from_pixbuf(pixbuf);
-        this.ui.get_object("title").set_label(album.get_title());
+        let cover = this.ui.get_object("cover");
+        let title = this.ui.get_object("title");
+        cover.set_from_pixbuf(pixbuf);
+        cover.get_style_context().add_class("cover");
+        title.get_style_context().add_class("title");
+        title.set_label(album.get_title());
         if (album.get_creation_date()) {
             this.ui.get_object("year").set_markup(
                 "<span color='grey'>(" + album.get_creation_date().get_year() + ")</span>");
@@ -582,13 +585,14 @@ const ArtistAlbumWidget = new Lang.Class({
                     songWidget.iter = iter;
                     songWidget.model = model;
                     songWidget.title = ui.get_object("title");
-
+                    let icon = ui.get_object("image1");
+                    icon.get_style_context().add_class("icon");
                     try{
                         this.player.discoverer.discover_uri(track.get_url());
                         model.set(iter,
                             [0, 1, 2, 3, 4, 5],
                             [ title, '', '', false, nowPlayingIconName, track]);
-                        songWidget.nowPlayingSign = ui.get_object("image1");
+                        songWidget.nowPlayingSign = icon;
                         songWidget.nowPlayingSign.set_from_icon_name(nowPlayingIconName, 
Gtk.IconSize.SMALL_TOOLBAR);
                         songWidget.nowPlayingSign.set_no_show_all("true");
                         songWidget.nowPlayingSign.set_alignment(0.0,0.6);
@@ -601,7 +605,7 @@ const ArtistAlbumWidget = new Lang.Class({
                         this.model.set(iter,
                             [0, 1, 2, 3, 4, 5],
                             [ title, '', '', true, errorIconName, track ]);
-                        songWidget.nowPlayingSign = ui.get_object("image1");
+                        songWidget.nowPlayingSign = icon;
                         songWidget.nowPlayingSign.set_from_icon_name(errorIconName, 
Gtk.IconSize.SMALL_TOOLBAR);
                         songWidget.nowPlayingSign.set_alignment(0.0,0.6);
                         songWidget.can_be_played = false;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]