@@ -19,6 +19,7 @@ import Ubuntu.Components 0.1
19import "../Components"
19import "../Components"
20import "../Components/ListItems" as ListItems
20import "../Components/ListItems" as ListItems
21import "../Components/IconUtil.js" as IconUtil
21import "../Components/IconUtil.js" as IconUtil
23ScopeView {
24ScopeView {
24 id: scopeView
25 id: scopeView
@@ -75,7 +76,32 @@ ScopeView {
75 text: title
76 text: title
76 imageWidth: units.gu(11)
77 imageWidth: units.gu(11)
77 imageHeight: units.gu(16)
78 imageHeight: units.gu(16)
78 source: IconUtil.from_gicon(icon)
80 source: IconUtil.from_gicon(icon)
87+ mouse.accepted = true
88+ effect.positionPx = mapToItem(categoryView, 0, 0).y
89+ scopeView.scope.activate(column_0, column_1,
96+ mouse.accepted = true
97+ effect.positionPx = mapToItem(categoryView, 0, 0).y
98+ scopeView.scope.preview(column_0, column_1,
@@ -93,4 +119,83 @@ ScopeView {
93 searchEntryEnabled: true
119 searchEntryEnabled: true
127+ bottomMargin: -bottomOverflow
129+ sourceItem: categoryView
133+ topGapPx: (1 - gap) * positionPx
134+ topOpacity: (1 - gap * 1.2)
135+ bottomGapPx: positionPx + gap * (targetBottomGapPx - positionPx)
136+ bottomOverflow: units.gu(20)
137+ bottomOpacity: 1 - (gap * 0.8)
139+ property int targetBottomGapPx: height - units.gu(8) - bottomOverflow
140+ property real gap: previewLoader.open ? 1.0 : 0.0
145+ easing.type: Easing.InOutQuad
147+ if (!previewLoader.open && !running) {
148+ previewLoader.onScreen = false
156+ target: scopeView.scope
158+ previewLoader.previewData = preview
159+ previewLoader.open = true
163+ PreviewDelegateMapper {
164+ id: previewDelegateMapper
168+ ignoreUnknownSignals: true
169+ target: previewLoader.valid ? previewLoader.item : null
171+ previewLoader.open = false
177+ property var previewData
178+ height: effect.bottomGapPx - effect.topGapPx
181+ topMargin: effect.topGapPx
185+ source: onScreen ? previewDelegateMapper.map(previewLoader.previewData.rendererName) : ""
187+ property bool open: false
188+ property bool onScreen: false
189+ property bool valid: item !== null
198+ item.previewData = previewLoader.previewData