banshee r3389 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Collection.Gui src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView



Author: abock
Date: Wed Mar  5 22:49:37 2008
New Revision: 3389
URL: http://svn.gnome.org/viewvc/banshee?rev=3389&view=rev

Log:
2008-03-05  Aaron Bockover  <abock gnome org>

    * src/Core/Banshee.ThickClient/Banshee.Collection.Gui/BetaReleaseViewOverlay.cs:
    * src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs:
    Use the allocation passed to Render to do the maths

    * src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs:
    Expose ListAllocation as a protected property



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/BetaReleaseViewOverlay.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs
   trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/BetaReleaseViewOverlay.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/BetaReleaseViewOverlay.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/BetaReleaseViewOverlay.cs	Wed Mar  5 22:49:37 2008
@@ -143,7 +143,7 @@
             widget.QueueDraw ();
         }
 
-        public void Render (Theme theme, Cairo.Context cr, Gdk.Rectangle clip)
+        public void Render (Theme theme, Gdk.Rectangle allocation, Cairo.Context cr, Gdk.Rectangle clip)
         {
             if (widget == null) {
                 return;
@@ -159,7 +159,7 @@
             theme.Context.Radius = 12;
 
             Gdk.Rectangle rect = new Gdk.Rectangle ();
-            rect.Width = (int)Math.Round (widget.Allocation.Width * 0.75);
+            rect.Width = (int)Math.Round (allocation.Width * 0.75);
 
             int padding = (int)theme.Context.Radius * 2;
             int spacing = padding / 2;
@@ -175,8 +175,8 @@
             layout.GetPixelSize (out layout_width, out layout_height);
 
             rect.Height = layout_height + 2 * padding;
-            rect.X = (widget.Allocation.Width - rect.Width) / 2;
-            rect.Y = (widget.Allocation.Height - rect.Height) / 2;
+            rect.X = (allocation.Width - rect.Width) / 2;
+            rect.Y = (allocation.Height - rect.Height) / 2;
             int layout_x = rect.X + padding + spacing + logo_scale.Width;
             int layout_y = rect.Y + padding;
             double alpha = stage.ActorCount > 0 ? 1.0 - stage.Actor.Percent : 1.0;
@@ -184,7 +184,7 @@
             Cairo.Color color = theme.Colors.GetWidgetColor (GtkColorClass.Background, StateType.Normal);
             color.A = Theme.Clamp (0.0, 0.85, alpha);
             cr.Color = color;
-            cr.Rectangle (0, 0, widget.Allocation.Width, widget.Allocation.Height);
+            cr.Rectangle (0, 0, allocation.Width, allocation.Height);
             cr.Fill ();
 
             if (stage.Playing && alpha < 1.0) {

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Collection.Gui/TrackListView.cs	Wed Mar  5 22:49:37 2008
@@ -122,7 +122,7 @@
         protected override void ChildClassPostRender (Gdk.EventExpose evnt, Cairo.Context cr, Gdk.Rectangle clip)
         {
             if (evnt.Window == ListWindow && overlay != null) {
-                overlay.Render (Theme, cr, clip);
+                overlay.Render (Theme, ListAllocation, cr, clip);
             }
         }
         

Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs	(original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs	Wed Mar  5 22:49:37 2008
@@ -54,6 +54,10 @@
         private Gdk.Rectangle footer_alloc;
         private Gdk.Rectangle left_border_alloc;
         private Gdk.Rectangle right_border_alloc;
+        
+        protected Gdk.Rectangle ListAllocation {
+            get { return list_alloc; }
+        }
        
         protected override void OnRealized ()
         {



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