[hyena/gtk3] GrabHandle: Use "pane-separator" class for proper theming



commit 8d430a891513e78a87921e05fa12382c3a7728fa
Author: Olivier Dufour <olivier duff gmail com>
Date:   Sat Jul 9 14:34:27 2011 +0200

    GrabHandle: Use "pane-separator" class for proper theming
    
    Signed-off-by: Bertrand Lorentz <bertrand lorentz gmail com>

 Hyena.Gui/Hyena.Widgets/GrabHandle.cs |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/Hyena.Gui/Hyena.Widgets/GrabHandle.cs b/Hyena.Gui/Hyena.Widgets/GrabHandle.cs
index 3835926..5dfab0c 100644
--- a/Hyena.Gui/Hyena.Widgets/GrabHandle.cs
+++ b/Hyena.Gui/Hyena.Widgets/GrabHandle.cs
@@ -53,13 +53,10 @@ namespace Hyena.Widgets
 
             da.Drawn += (o, a) => {
                 if (da.IsDrawable) {
-                    //TODO: check if transform is needed for render funct, but seems not according to this example:
-                    //http://developer.gnome.org/gtk3/stable/GtkStyleContext.html#id545216
-                    //CairoHelper.TransformToWindow (a.Cr, da, da.Window);
-                    da.StyleContext.State = StateFlags.Active;
+                    da.StyleContext.Save ();
+                    da.StyleContext.AddClass ("pane-separator");
                     da.StyleContext.RenderHandle (a.Cr, 0, 0, da.Allocation.Width, da.Allocation.Height);
-                    //Gtk.Style.PaintHandle (da.Style, a.Cr, da.State, ShadowType.In,
-                    //    this, "entry", 0, 0, da.Allocation.Width, da.Allocation.Height, Orientation);
+                    da.StyleContext.Restore ();
                 }
             };
         }



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