[banshee/grid] Fixed vadjustment upper calculation for grid mode
- From: Aaron Bockover <abock src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [banshee/grid] Fixed vadjustment upper calculation for grid mode
- Date: Fri, 4 Dec 2009 06:23:24 +0000 (UTC)
commit c4899a547a70d507a64bb963c391d02553b76eac
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/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
index 8706c33..1926f77 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
+++ b/src/Libraries/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]