[hyena/gtk3] Hyena.Gui: Fix coordinates for shading and theming tests
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hyena/gtk3] Hyena.Gui: Fix coordinates for shading and theming tests
- Date: Wed, 27 Jul 2011 20:41:37 +0000 (UTC)
commit fd1e612ae43d3fe8f2abe39019f5c6cbe520a7df
Author: Olivier Dufour <olivier duff gmail com>
Date: Wed Jul 27 19:19:00 2011 +0200
Hyena.Gui: Fix coordinates for shading and theming tests
Hyena.Gui/Hyena.Gui.Theming/ThemeTestModule.cs | 6 +++---
Hyena.Gui/Hyena.Gui/ShadingTestWindow.cs | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/Hyena.Gui/Hyena.Gui.Theming/ThemeTestModule.cs b/Hyena.Gui/Hyena.Gui.Theming/ThemeTestModule.cs
index a3ca911..7452520 100644
--- a/Hyena.Gui/Hyena.Gui.Theming/ThemeTestModule.cs
+++ b/Hyena.Gui/Hyena.Gui.Theming/ThemeTestModule.cs
@@ -83,12 +83,12 @@ namespace Hyena.Gui.Theming
protected override bool OnDrawn (Cairo.Context cr)
{
var alloc = new Gdk.Rectangle () {
- X = Allocation.X,
- Y = Allocation.Y,
+ X = 0,
+ Y = 0,
Width = Allocation.Width,
Height = Allocation.Height
};
- CairoHelper.TransformToWindow (cr, this, Window);
+
theme.DrawListBackground (cr, alloc, true);
theme.DrawFrameBorder (cr, alloc);
return true;
diff --git a/Hyena.Gui/Hyena.Gui/ShadingTestWindow.cs b/Hyena.Gui/Hyena.Gui/ShadingTestWindow.cs
index eb37076..00a3e0d 100644
--- a/Hyena.Gui/Hyena.Gui/ShadingTestWindow.cs
+++ b/Hyena.Gui/Hyena.Gui/ShadingTestWindow.cs
@@ -53,8 +53,8 @@ namespace Hyena.Gui
double bg_b = (double)(i / 255.0);
double fg_b = 1.0 - bg_b;
- double x = Allocation.X + xi * step_width;
- double y = Allocation.Y + yi * step_height;
+ double x = xi * step_width;
+ double y = yi * step_height;
cr.Rectangle (x, y, step_width, step_height);
cr.Color = CairoExtensions.ColorFromHsb (h, s, bg_b);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]