[hyena/gtk3] SegmentedBar: Fix coordinates in OnDrawn



commit b9245443448d4d8475f61c54b7dc9c51cf7f642f
Author: Olivier Dufour <olivier duff gmail com>
Date:   Wed Jul 27 19:43:01 2011 +0200

    SegmentedBar: Fix coordinates in OnDrawn

 Hyena.Gui/Hyena.Widgets/SegmentedBar.cs |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/Hyena.Gui/Hyena.Widgets/SegmentedBar.cs b/Hyena.Gui/Hyena.Widgets/SegmentedBar.cs
index 9113748..72ac1b9 100644
--- a/Hyena.Gui/Hyena.Widgets/SegmentedBar.cs
+++ b/Hyena.Gui/Hyena.Widgets/SegmentedBar.cs
@@ -322,14 +322,12 @@ namespace Hyena.Widgets
                 return base.OnDrawn (cr);
             }
 
-            CairoHelper.TransformToWindow (cr, this, Window);
-
             if (reflect) {
                 CairoExtensions.PushGroup (cr);
             }
 
             cr.Operator = Operator.Over;
-            cr.Translate (Allocation.X + h_padding, Allocation.Y);
+            cr.Translate (h_padding, 0);
             cr.Rectangle (0, 0, Allocation.Width - h_padding, Math.Max (2 * bar_height,
                 bar_height + bar_label_spacing + layout_height));
             cr.Clip ();
@@ -371,9 +369,8 @@ namespace Hyena.Widgets
             }
 
             if (show_labels) {
-                cr.Translate ((reflect ? Allocation.X : -h_padding) + (Allocation.Width - layout_width) / 2,
-                     (reflect ? Allocation.Y : 0) + bar_height + bar_label_spacing);
-
+                cr.Translate ((reflect ? 0 : -h_padding) + (Allocation.Width - layout_width) / 2,
+                     bar_height + bar_label_spacing);
                 RenderLabels (cr);
             }
 



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