[banshee] [grid] Fix virtal size calculation (bgo#612587)
- From: Alexander Kojevnikov <alexk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [grid] Fix virtal size calculation (bgo#612587)
- Date: Fri, 12 Mar 2010 07:57:43 +0000 (UTC)
commit c426d084508604baac814568873b4dc8c01a27bf
Author: Alexander Kojevnikov <alexander kojevnikov com>
Date: Fri Mar 12 18:55:50 2010 +1100
[grid] Fix virtal size calculation (bgo#612587)
.../Hyena.Gui/Hyena.Data.Gui/DataViewLayoutGrid.cs | 14 ++------------
1 files changed, 2 insertions(+), 12 deletions(-)
---
diff --git a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/DataViewLayoutGrid.cs b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/DataViewLayoutGrid.cs
index 41a1cce..4072d34 100644
--- a/src/Libraries/Hyena.Gui/Hyena.Data.Gui/DataViewLayoutGrid.cs
+++ b/src/Libraries/Hyena.Gui/Hyena.Data.Gui/DataViewLayoutGrid.cs
@@ -51,20 +51,10 @@ namespace Hyena.Data.Gui
protected override void InvalidateVirtualSize ()
{
- // FIXME: Improper virtual size allocation
- // - Verify width and height generally computed correctly
- // - Not accounting for spacing/padding or rounding error
- int model_rows = Model == null ? 0 : Model.Count;
+ double model_rows = Model == null ? 0 : Model.Count;
VirtualSize = new Size (
ChildSize.Width * Math.Max (Columns, 1),
- (ChildSize.Height * (model_rows + 1)) / Math.Max (Columns, 1));
-
- /*Console.WriteLine ("======");
- Console.WriteLine (" VIEW COLUMNS = {0}", Columns);
- Console.WriteLine (" VIEW ROWS = {0}", Rows);
- Console.WriteLine (" MODEL ROWS = {0}", model_rows);
- Console.WriteLine (" CHILD SIZE = {0}", ChildSize);
- Console.WriteLine (" VIRTUAL SIZE = {0}", VirtualSize);*/
+ ChildSize.Height * Math.Ceiling (model_rows / Math.Max (Columns, 1)));
}
protected override void InvalidateChildCollection ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]