[banshee] Add thin highlight to ListView selection for 3D effect



commit 5a90e93462b2339f831ea5893677dc7d3c5876dd
Author: Andrea Cimitan <andrea cimitan gmail com>
Date:   Tue Jun 2 13:13:47 2009 -0500

    Add thin highlight to ListView selection for 3D effect
    
    Signed-off-by: Gabriel Burt <gabriel burt gmail com>
---
 .../Hyena.Gui/Hyena.Gui.Theming/GtkTheme.cs        |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/GtkTheme.cs b/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/GtkTheme.cs
index 7ecf8ee..401f781 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/GtkTheme.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Gui.Theming/GtkTheme.cs
@@ -224,7 +224,9 @@ namespace Hyena.Gui.Theming
             bool filled, bool stroked, Cairo.Color color, CairoCorners corners)
         {
             Cairo.Color selection_color = color;
+            Cairo.Color selection_highlight = CairoExtensions.ColorShade (selection_color, 1.24);
             Cairo.Color selection_stroke = CairoExtensions.ColorShade (selection_color, 0.85);
+            selection_highlight.A = 0.5;
             selection_stroke.A = color.A;
             
             if (filled) {
@@ -244,7 +246,15 @@ namespace Hyena.Gui.Theming
                 cr.Fill ();
                 grad.Destroy ();
             }
-            
+
+            if (filled && stroked) {
+                cr.LineWidth = 1.0;
+                cr.Color = selection_highlight;
+                CairoExtensions.RoundedRectangle (cr, x + 1.5, y + 1.5, width - 3, height - 3,
+                    Context.Radius - 1, corners, true);
+                cr.Stroke ();
+            }
+
             if (stroked) {
                 cr.LineWidth = 1.0;
                 cr.Color = selection_stroke;
@@ -261,4 +271,4 @@ namespace Hyena.Gui.Theming
             cr.Fill ();
         }
     }
-}
\ No newline at end of file
+}



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