[hyena] Fixed vadjustment upper calculation for grid mode



commit 12004f866577eb4504c08ce87726cda19bcf1ce5
Author: Aaron Bockover <abockover novell com>
Date:   Thu Dec 3 12:12:50 2009 +0800

    Fixed vadjustment upper calculation for grid mode

 .../ListView/ListView_Interaction.cs               |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs b/src/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
index 8706c33..1926f77 100644
--- a/src/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
+++ b/src/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
@@ -806,7 +806,7 @@ namespace Hyena.Data.Gui
             if (vadjustment != null && model != null) {
                 vadjustment.Upper = LayoutStyle == DataViewLayoutStyle.List
                     ? RowHeight * model.Count
-                    : (RowHeight * model.Count) / GridColumnsInView;
+                    : (int)Math.Ceiling (model.Count / (double)GridColumnsInView) * RowHeight;
                 vadjustment.StepIncrement = RowHeight;
                 if (vadjustment.Value + vadjustment.PageSize > vadjustment.Upper) {
                     vadjustment.Value = vadjustment.Upper - vadjustment.PageSize;



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