Review Request 117757: Improve Kickoff's scrolling when changing categories

Martin Klapetek martin.klapetek at gmail.com
Fri Apr 25 07:50:56 UTC 2014



> On April 25, 2014, 2:02 a.m., David Edmundson wrote:
> > applets/kickoff/package/contents/ui/ApplicationsView.qml, line 131
> > <https://git.reviewboard.kde.org/r/117757/diff/1/?file=268120#file268120line131>
> >
> >     Can't we just save and restore the contentY rather than going via indexes and back.
> >     
> >

The index is required for the model to switch categories anyway, this is the simplest solution with as little code (and memory) as possible...

Plus, the docs says "It is not recommended to use contentX or contentY to position the view at a particular index. "

http://qt-project.org/doc/qt-5/qml-qtquick-listview.html#positionViewAtIndex-method


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117757/#review56454
-----------------------------------------------------------


On April 24, 2014, 10:14 p.m., Martin Klapetek wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117757/
> -----------------------------------------------------------
> 
> (Updated April 24, 2014, 10:14 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Repository: plasma-desktop
> 
> 
> Description
> -------
> 
> Use case: I'm in All Applications, I scroll down, select Utilities, category switches inside Utilities and the scrollbar is at the same bottom position from my first scroll, which means that I see the apps in Utilities that are at the bottom instead starting from the top.
> 
> These are two changes: always scroll the view to top when going into a subcategory and then always center on the parent category when going level up. The breadcrumbs however store QModelIndex (which makes sense) and QModelIndex cannot be used from QML, so I added a helper method to the model that returns a row of the given index and the view then centers on that row when going category up. Might not be good at all but imho works&looks better.
> 
> 
> Diffs
> -----
> 
>   applets/kickoff/core/applicationmodel.h a039773 
>   applets/kickoff/core/applicationmodel.cpp 3a5f0bb 
>   applets/kickoff/package/contents/ui/ApplicationsView.qml 09b7618 
> 
> Diff: https://git.reviewboard.kde.org/r/117757/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Martin Klapetek
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140425/0d5a1576/attachment.html>


More information about the Plasma-devel mailing list