~aacid/unity-2d/DoNotHideLauncherImmediatellyOnIconRemoval_884410

« back to all changes in this revision

Viewing changes to places/LensView.qml

  • Committer: Tarmac
  • Author(s): Renato Araujo Oliveira Filho, Florian Boucault
  • Date: 2011-11-22 18:20:16 UTC
  • mfrom: (768.5.42 places-rewrite)
  • Revision ID: tarmac-20111122182016-zyuclvankjf11dfo
[places] Rewrite RenderGrid to use only one Flickable element

* Created FocusPath element to help in the keyboard navigation;
* The code used to manually scroll the grid was removed, now everything is done by the QML Flickable element;
* This new implementation of RenderGrid allows every component be inside of this scroller, which makes the grid more flexible for moving elements around, helping in the implementation of Preview screen;

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
           the file 'UnityShowcaseRenderer.qml' and use it to render the category.
79
79
        */
80
80
        bodyDelegate: Loader {
 
81
            visible: category_model.count > 0
 
82
            width: parent.width
 
83
            height: visible ? item.contentHeight : 0
 
84
 
81
85
            property string name: model.column_0
82
86
            property string iconHint: model.column_1
83
87
            property string rendererName: model.column_2
107
111
               In that case the list view scrolls the Flickable appropriately.
108
112
            */
109
113
            property int totalHeight: item.totalHeight != undefined ? item.totalHeight : 0
110
 
            property int contentY
111
 
            Binding { target: item; property: "contentY"; value: contentY }
112
 
            property bool focusable: category_model.count > 0
113
114
            property variant currentItem: item.currentItem
114
115
 
115
116
            Binding { target: item; property: "name"; value: name }
122
123
        }
123
124
 
124
125
        headerDelegate: CategoryHeader {
125
 
            visible: body.item.needHeader && body.focusable
 
126
            visible: body.item.needHeader && body.visible
126
127
            height: visible ? 32 : 0
127
128
 
128
129
            property bool foldable: body.item.folded != undefined