banshee r3096 - in trunk/banshee: . src/Core/Banshee.ThickClient/Banshee.Sources.Gui



Author: abock
Date: Wed Jan 30 05:01:31 2008
New Revision: 3096
URL: http://svn.gnome.org/viewvc/banshee?rev=3096&view=rev

Log:
2008-01-29  Aaron Bockover  <abock gnome org>

    * src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceRowRenderer.cs:
    * src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs:
    Fix a few minor rendering issues



Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceRowRenderer.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceRowRenderer.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceRowRenderer.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceRowRenderer.cs	Wed Jan 30 05:01:31 2008
@@ -90,12 +90,15 @@
             bool path_selected = view.Selection.PathIsSelected (path);
             
             if (path_selected) {
-                // clear the standard GTK selection
-                drawable.DrawRectangle (widget.Style.BaseGC (StateType.Normal), true, background_area);
+                Gdk.Rectangle rect = background_area;
+                rect.X -= 2;
+                rect.Width += 4;
+                // clear the standard GTK selection and focus
+                drawable.DrawRectangle (widget.Style.BaseGC (StateType.Normal), true, rect);
                 
                 // draw the hot cairo selection
-                view.Graphics.DrawRowSelection (view.Cr, background_area.X, background_area.Y + 1, 
-                    background_area.Width, background_area.Height - 2);
+                view.Graphics.DrawRowSelection (view.Cr, background_area.X + 1, background_area.Y + 1, 
+                    background_area.Width - 2, background_area.Height - 2);
             } else if(path != null && path.Equals (view.HighlightedPath)) {
                 drawable.DrawRectangle (widget.Style.BackgroundGC (StateType.Selected), false,
                     new Gdk.Rectangle (background_area.X + 1, background_area.Y + 1, 
@@ -146,7 +149,7 @@
             titleLayout.FontDescription = fd;
             titleLayout.Width = (int)((maxTitleLayoutWidth) * Pango.Scale.PangoScale);
             titleLayout.Ellipsize = EllipsizeMode.End;
-            titleLayout.SetText(GLib.Markup.EscapeText(source.Name));
+            titleLayout.SetText(source.Name);
             titleLayout.GetPixelSize(out titleLayoutWidth, out titleLayoutHeight);
             
             Gdk.GC mainGC = widget.Style.TextGC(state);
@@ -154,7 +157,7 @@
             if(icon != null) {
                 drawable.DrawPixbuf(mainGC, icon, 0, 0, 
                     cell_area.X + 0, 
-                    cell_area.Y + ((cell_area.Height - icon.Height) / 2),
+                    cell_area.Y + ((cell_area.Height - icon.Height) / 2) + 1,
                     icon.Width, icon.Height,
                     RgbDither.None, 0, 0);
             }

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Sources.Gui/SourceView.cs	Wed Jan 30 05:01:31 2008
@@ -132,11 +132,8 @@
         
         protected override bool OnExposeEvent (EventExpose evnt)
         {
-            cr = Gdk.CairoHelper.Create (evnt.Window);
-            cr.Rectangle (evnt.Area.X, evnt.Area.Y, evnt.Area.Width, evnt.Area.Width);
-            cr.Clip ();
-            
             try {
+                cr = Gdk.CairoHelper.Create (evnt.Window);
                 return base.OnExposeEvent (evnt);
             } finally {
                 ((IDisposable)cr.Target).Dispose ();



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