Re: Model/view ideas for GtkListBox/GtkFlowBox
- From: Matthias Clasen <matthias clasen gmail com>
- To: Alexander Larsson <alexl redhat com>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: Model/view ideas for GtkListBox/GtkFlowBox
- Date: Mon, 25 Nov 2013 06:22:10 -0500
The example binary can scroll a 50.000 row list with labels or entries without noticeable problems.
Lessons learned so far:
- Average row heights are a little tricky. If you scroll into a region where your rows happen to be 2 lines instead of one, your list jumps to twice the size. I ended up using a very slow-changing average to counteract this.
- Scrolling with average heights needs to be done carefully. Otherwise, you'll never reach 'the far end'. I ended up doing size allocation from the end that we're closer to. I was afraid that this would make the 'jump in the middle', but it seems to work mostly ok.
There's of course a lot of stuff missing here:
- no keynav
- no sorting
- no headers
- no caching beyond the visible range
- no pixelcache (do we need it ?)
- no attempt to keep a stable row-item relation while an item is visible. I just always reconnect all rows
But I found this exercise pretty enlightening.
Matthias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]