[hyena/gtk3] ListView: Fix origin coordinates for rendering and interaction
- From: Bertrand Lorentz <blorentz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [hyena/gtk3] ListView: Fix origin coordinates for rendering and interaction
- Date: Wed, 27 Jul 2011 21:29:35 +0000 (UTC)
commit 5d86c55bd84ad0bd2b4e506a78e0bd2b29d0425a
Author: Olivier Dufour <olivier duff gmail com>
Date: Wed Jul 27 23:06:13 2011 +0200
ListView: Fix origin coordinates for rendering and interaction
Signed-off-by: Bertrand Lorentz <bertrand lorentz gmail com>
.../Hyena.Data.Gui/ListView/ListView_Rendering.cs | 4 ++--
.../Hyena.Data.Gui/ListView/ListView_Windowing.cs | 4 +---
2 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs b/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
index 91a36d0..9fb4999 100644
--- a/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
+++ b/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Rendering.cs
@@ -193,7 +193,7 @@ namespace Hyena.Data.Gui
}
if (pressed_column_is_dragging && pressed_column_index >= 0) {
- cell_area.X = pressed_column_x_drag + Allocation.X - HadjustmentValue;
+ cell_area.X = pressed_column_x_drag - HadjustmentValue;
cell_area.Width = column_cache[pressed_column_index].Width;
PaintHeaderCell (cr, cell_area, pressed_column_index, true, ref have_drawn_separator);
}
@@ -478,7 +478,7 @@ namespace Hyena.Data.Gui
CachedColumn column = column_cache[pressed_column_index];
- int x = pressed_column_x_drag + Allocation.X + 1 - HadjustmentValue;
+ int x = pressed_column_x_drag + 1 - HadjustmentValue;
StyleContext.Save ();
StyleContext.AddClass ("entry");
diff --git a/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs b/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs
index 5b20ef8..ef7bd4d 100644
--- a/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs
+++ b/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Windowing.cs
@@ -121,7 +121,7 @@ namespace Hyena.Data.Gui
return;
}
- header_rendering_alloc = allocation;
+ header_rendering_alloc = new Gdk.Rectangle (0, 0, allocation.Width, allocation.Height);
header_rendering_alloc.Height = HeaderHeight;
list_rendering_alloc.X = header_rendering_alloc.X + Theme.TotalBorderWidth;
@@ -134,10 +134,8 @@ namespace Hyena.Data.Gui
header_interaction_alloc.X = list_rendering_alloc.X;
header_interaction_alloc.Width = list_rendering_alloc.Width;
header_interaction_alloc.Height += Theme.BorderWidth;
- header_interaction_alloc.Offset (-allocation.X, -allocation.Y);
list_interaction_alloc = list_rendering_alloc;
- list_interaction_alloc.Offset (-allocation.X, -allocation.Y);
header_width = header_interaction_alloc.Width;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]