[banshee/gtk3] TrackInfoDisplay: Fix drawing coordinates



commit 94fee2fb4a9fceff815e212312637f1881baae15
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Sun Jul 31 11:42:23 2011 +0200

    TrackInfoDisplay: Fix drawing coordinates
    
    This fixes the track info display in various places, but for some reason
    it's still not visible in the main UI toolbar.

 .../Banshee.Gui.Widgets/ClassicTrackInfoDisplay.cs |    4 ++--
 .../Banshee.Gui.Widgets/CoverArtDisplay.cs         |    2 +-
 .../Banshee.Gui.Widgets/TrackInfoDisplay.cs        |    7 +------
 3 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/ClassicTrackInfoDisplay.cs b/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/ClassicTrackInfoDisplay.cs
index 5f7744d..e052b68 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/ClassicTrackInfoDisplay.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/ClassicTrackInfoDisplay.cs
@@ -176,7 +176,7 @@ namespace Banshee.Gui.Widgets
             }
 
             double offset = ArtworkSizeRequest + ArtworkSpacing, y = 0;
-            double x = Allocation.X + offset;
+            double x = offset;
             double width = Allocation.Width - offset;
             int fl_width, fl_height, sl_width, sl_height;
             int pango_width = (int)(width * Pango.Scale.PangoScale);
@@ -205,7 +205,7 @@ namespace Banshee.Gui.Widgets
                 SetSizeRequest (-1, fl_height + sl_height);
             }
 
-            y = Allocation.Y + (Allocation.Height - (fl_height + sl_height)) / 2;
+            y = (Allocation.Height - (fl_height + sl_height)) / 2;
 
             // Render the layouts
             cr.Antialias = Cairo.Antialias.Default;
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/CoverArtDisplay.cs b/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/CoverArtDisplay.cs
index 1f9581f..311c048 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/CoverArtDisplay.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/CoverArtDisplay.cs
@@ -80,7 +80,7 @@ namespace Banshee.Gui.Widgets
             idle_album = idle_album ?? PixbufImageSurface.Create (Banshee.Gui.IconThemeUtils.LoadIcon (
                 ArtworkSizeRequest, MissingAudioIconName), true);
 
-            ArtworkRenderer.RenderThumbnail (cr, idle_album, false, Allocation.X, Allocation.Y,
+            ArtworkRenderer.RenderThumbnail (cr, idle_album, false, 0, 0,
                 ArtworkSizeRequest, ArtworkSizeRequest,
                 false, 0, true, BackgroundColor);
         }
diff --git a/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs b/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
index 838dcf8..055051f 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/TrackInfoDisplay.cs
@@ -249,17 +249,12 @@ namespace Banshee.Gui.Widgets
                 return true;
             }
 
-            cr.Rectangle (Allocation.X, Allocation.Y, Allocation.Width, Allocation.Height);
-            cr.Clip ();
-
             if (idle) {
                 RenderIdle (cr);
             } else {
                 RenderAnimation (cr);
             }
 
-            cr.ResetClip ();
-
             return true;
         }
 
@@ -336,7 +331,7 @@ namespace Banshee.Gui.Widgets
         protected virtual void RenderCoverArt (Cairo.Context cr, ImageSurface image)
         {
             ArtworkRenderer.RenderThumbnail (cr, image, false,
-                Allocation.X, Allocation.Y + ArtworkOffset,
+                0, ArtworkOffset,
                 ArtworkSizeRequest, ArtworkSizeRequest,
                 !IsMissingImage (image), 0.0,
                 IsMissingImage (image), BackgroundColor);



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