@@ -56,53 +56,45 @@ ScopeView {
56 delegate: ListItems.Base {
56 delegate: ListItems.Base {
57 highlightWhenPressed: false
57 highlightWhenPressed: false
59− FilterGrid {
59+ Loader {
60− id: filtergrid
60+ id: rendererLoader
64 top: parent.top
62 top: parent.top
65 left: parent.left
63 left: parent.left
66 right: parent.right
64 right: parent.right
69− filter: false
67+ source: getRenderer(model.renderer, model.contentType)
70− minimumHorizontalSpacing: units.gu(0.5)
68+
71− delegateWidth: units.gu(11)
69+ onLoaded: {
72− delegateHeight: units.gu(18)
70+ item.model = results
73− verticalSpacing: units.gu(2)
71+ }
75− delegate: Tile {
73+ Connections {
76− width: filtergrid.cellWidth
74+ target: rendererLoader.item
77− height: filtergrid.cellHeight
79− imageWidth: units.gu(11)
80− imageHeight: units.gu(16)
82− source: IconUtil.from_gicon(icon)
88− onClicked: {
75+ onClicked: {
89− mouse.accepted = true
90− effect.positionPx = mapToItem(categoryView, 0, 0).y
76+ effect.positionPx = mapToItem(categoryView, 0, itemY).y
91− scopeView.scope.activate(uri, icon,
77+ scopeView.scope.activate(delegateItem.model.uri,
78+ delegateItem.model.icon,
92− category, 0,
79+ delegateItem.model.category,
93− mimetype, title,
81+ delegateItem.model.mimetype,
94− comment, dndUri,
82+ delegateItem.model.title,
83+ delegateItem.model.comment,
84+ delegateItem.model.dndUri,
95− metadata)
85+ delegateItem.model.metadata)
97− onPressAndHold: {
87+ onPressAndHold: {
98− mouse.accepted = true
99− effect.positionPx = mapToItem(categoryView, 0, 0).y
88+ effect.positionPx = mapToItem(categoryView, 0, itemY).y
100− scopeView.scope.preview(uri, icon,
89+ scopeView.scope.preview( delegateItem.model.uri,
90+ delegateItem.model.icon,
101− category, 0,
91+ delegateItem.model.category,
102− mimetype, title,
93+ delegateItem.model.mimetype,
103− comment, dndUri,
94+ delegateItem.model.title,
95+ delegateItem.model.comment,
96+ delegateItem.model.dndUri,
104− metadata)
97+ delegateItem.model.metadata)
@@ -122,6 +114,19 @@ ScopeView {
117+ function getRenderer(rendererId, contentType) {
118+ switch (rendererId) {
120+ switch (contentType) {
121+ case "video": return "Generic/GenericFilterGridPotrait.qml";
122+ default: return "Generic/GenericFilterGrid.qml";
125+ case "carousel": return "Generic/GenericCarousel.qml";
126+ default: return "Generic/GenericFilterGrid.qml";
125 OpenEffect {
130 OpenEffect {
126 id: effect
131 id: effect
127 anchors {
132 anchors {