PlasmaComponents ScrollBar is broken

Aleix Pol aleixpol at kde.org
Wed Aug 1 00:17:13 UTC 2012


On Tue, Jul 31, 2012 at 10:39 AM, Marco Martin <notmart at gmail.com> wrote:
> On Monday 30 July 2012, Aleix Pol wrote:
>> I've been thinking of rewriting the ScrollBar without this RangeModel,
>> but maybe that's only because I don't understand it enough. Can
>> anybody look into this and give me a hand? I think it would be really
>> interesting to sort this one out!
>>
>> Aleix
>
> try to update to current master, binding loop warnings are gone.
>
> the test case seems to work fine for me but don't know what was the intended
> behavior, so give it a try ;)
>
> Cheers,
> Marco Martin
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel

Well, I've just tried it, it's definitely better without the warning
but not fixed yet.

The idea of this example is that it will go to the end of the list
every time a new data enters (like in a chat or the log when you're
updating your system, that's the two places I was planning to use
this).

If you see in my example (you can run it using
kde:scratch/apol/kdeqmlviewer if you want) you can see that if the
scrollbar has "interactive: false" it works just fine (or if you
removethe scrollbar, of course), but if you have it there it doesn't
scroll until the end but halfway, like to the end but 6 px.

It seems to be a rounding problem, or something similar, but I really
couldn't find the problem. You can easily see what's happening with
the ListView's debug output:

onContentYChanged: console.log(".......... y: ", contentY)

When I run the file, this is what I get:
.......... y:  260
.......... y:  274
.......... y:  288
.......... y:  274
.......... y:  267
.......... y:  302
.......... y:  288
.......... y:  282
.......... y:  316

Meanwhile, I'll look into this again after your fix and see what I can do...

Aleix


More information about the Plasma-devel mailing list