[Qt-qml] SmoothedAnimation Soul Searching
alan.alpert at nokia.com
alan.alpert at nokia.com
Thu Sep 9 06:51:59 CEST 2010
> -----Original Message-----
> From: Cunha Leo (Nokia-MS-Qt/Oslo)
> Sent: Wednesday, September 08, 2010 6:52 PM
> To: Lam Bea (Nokia-MS-Qt/Brisbane); Alpert Alan (Nokia-MS-Qt/Brisbane)
> Cc: Qt-qml at trolltech.com
> Subject: RE: [Qt-qml] SmoothedAnimation Soul Searching
>
> hi,
>
> > -----Original Message-----
> > From: qt-qml-bounces at trolltech.com [mailto:qt-qml-
> > bounces at trolltech.com] On Behalf Of Lam Bea (Nokia-MS-Qt/Brisbane)
> >
> > On 03/09/2010, at 8:10 PM, ext Alan Alpert wrote:
> >
> > > I'm looking for some feedback on what people think the real use
> case
> > for
> > > SmoothedAnimation is. There's currently two different cases that
> I'm
> > looking
> > > into.
> > >
> > > A) Move from point C to point D, smoothly, where point D doesn't
> > change
> > > (much).
> > > B) Move from point C to point D, smoothly, where point D is an
> > animating or
> > > constantly changing value.
> > >
> > [...]
> > >
> > > Where I need some help is not only in verifying the reasoning I
> just
> > threw out
> > > there. I'm not yet convinced that option B is common enough to be a
> > valid use
> > > case. Does anyone know of a non-contrived example where you
> genuinely
> > want
> > > behavior B and not A?
> > >
> >
> >
> > I've seen Case B to be useful when auto-scrolling a view where the
> > content height continuously changes (e.g. because new items are being
> > added constantly, or items have variable height and are resized as
> they
> > are loaded). In this case NumberAnimation is too jerky since it
> > restarts whenever the target value changes.
>
> Another similar use case for B is for the list highlight to 'follow' a
> selected item while the list is scrolling,
> look at the list example.
>
> In the B case, I agree with you that the duration doesn't help much,
> but I
> don't know if the maximum velocity is what you always want on this
> case, as
> you might prefer to not follow too fast (depends on whether you want to
> set
> how much you can lag behind or you want the movement to follow with an
> average speed, so it doesn't accelerate too much).
It sounds like average velocity can be appropriate for both use cases. It sounds more like the real world value for the second use case is just that it is smooth, and there's less of a velocity requirement imposed upon it. I'm now of the opinion that, while behavior A is the more common use case, it still needs to provide a smooth experience for behavior B. But both cases can live with velocity remaining as an average, and so there isn't the conflict that I had originally perceived.
--
Alan Alpert
More information about the Qt-qml
mailing list