Re: [Banshee-List] banshee r3200 - in trunk/banshee: . src/Core/Hyena.Gui/Hyena.Data.Gui/ListView
- From: "Scott Peterson" <lunchtimemama gmail com>
- To: banshee-list gnome org
- Subject: Re: [Banshee-List] banshee r3200 - in trunk/banshee: . src/Core/Hyena.Gui/Hyena.Data.Gui/ListView
- Date: Mon, 11 Feb 2008 13:18:37 -0500
Actually, I've figured out what the problem was and how to fix it
(hint: "+ 1" isn't right). Unfortunately I can't commit b/c I've got a
bunch on experimental changes that I'm working on (see my massages
about ListView performance). The correct code is:
get { return (int) Math.Ceiling ((list_alloc.Height + RowHeight / 2) /
(double) RowHeight)}
This is because Math.Ceiling(list_alloc.Height / (double)RowHeight)
will just return the maximum number of rows that could fit in the list
if the first row is is perfectly aligned with the top of the list.
However if you scroll down so that the first visible row in the list
is less than half visible, than more rows can be seen in the list than
Math.Ceiling(list_alloc.Height / (double)RowHeight). Adding
RowHeight/2 takes care of that.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]