Dealing with the annoying scrolling bug in the chat plasmoid
David Edmundson
david at davidedmundson.co.uk
Wed Jul 4 23:19:07 UTC 2012
On Wed, Jul 4, 2012 at 3:08 AM, Lasath Fernando <kde at lasath.org> wrote:
> Hey,
>
> Instead of working on my GSoC (which I'll probably regret), I spent the
> morning investigating the issue with the chat plasmoid not scrolling
> properly. (BUG:293522)
>
> First thing I tried was removing the scrollbar entirely. Surprisingly, that
> did not magically fix everything ;-). So it's not (just) the ScrollBar that's
> giving us issues.
>
> By messing around further, I *THINK* I've determined the actual cause of this
> issue. Since delegates are only instantiated on demand, the flickable can't
> know the actual height of the total messages.
> This is a bit of speculation on my part, but I think the ListView takes the
> height of one delegate and multiplies it by the number of items for its
> 'height' property. That would explain why it works for the contactlist
> plasmoid but not this, since this has delegates of different heights.
>
> To test this out (and possible hacky fix), I tried
> cacheBuffer: 9001
> That actually fixed it marvelously, but it may be a little inefficient because if
> a conversation actually has 9001 messages, it'll keep all of their delegates
> in memory.
>
> The other option was disabling the ScrollBar (who uses them these days
> anyway). Then simply setting
> currentIndex: count - 1
> highlightFollowsCurrentItem: true
> made it auto-scroll on incoming messages while still allowing the user to
> scroll manually.
>
> So, while you guys are at Akademy, if you happen to speak to the Plasma
> guys and come up with a _magic_ solution, I'll be impressed at your
> witchcraft. Otherwise, we're going to have to do one of these.
>
> PS: I think this is the last showstopper bug with this plasmoid, so I want to
> get it fixed/out of the way.
>
1) if it is a bug in plasma, fix it in plasma. It's harder but worth it.
At least debug whether the contentHeight changes whilst you scroll.
If not, I suspect the scrollbar is broken. If it does change, it's
almost definitely what you said - and I'm much more happy with your
patch.
2) This doesn't solve the "scrolling to the end" issue ? Or does it?
Thanks for looking into this.
Dave
> ---
> Cheers,
> Lasath
> _______________________________________________
> KDE-Telepathy mailing list
> KDE-Telepathy at kde.org
> https://mail.kde.org/mailman/listinfo/kde-telepathy
More information about the KDE-Telepathy
mailing list