Merge lp:~cimi/unity8/unity8.dash-plugins-renderer into lp:unity8

Proposed by Andrea Cimitan
Status: Rejected
Rejected by: Andrea Cimitan
Proposed branch: lp:~cimi/unity8/unity8.dash-plugins-renderer
Merge into: lp:unity8
Prerequisite: lp:~mhr3/unity8/expose-renderer-hint
Diff against target: 347 lines (+233/-65)
6 files modified
Components/Tile.qml (+6/-63)
Components/TileStyle.qml (+87/-0)
Dash/Generic/GenericFilterGrid.qml (+0/-2)
Dash/Generic/GenericFilterGridDashPlugin.qml (+47/-0)
Dash/Generic/TileStyleDashPlugin.qml (+87/-0)
Dash/GenericScopeView.qml (+6/-0)
To merge this branch: bzr merge lp:~cimi/unity8/unity8.dash-plugins-renderer
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Unity Team Pending
Review via email: mp+189055@code.launchpad.net

Commit message

Make Tile themeable, use different delegate for Dash Plugins

Description of the change

Make Tile themeable, use different delegate for Dash Plugins

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:375
No commit message was specified in the merge proposal. Click on the following link and set the commit message (if you want a jenkins rebuild you need to trigger it yourself):
https://code.launchpad.net/~cimi/unity8/unity8.dash-plugins-renderer/+merge/189055/+edit-commit-message

http://jenkins.qa.ubuntu.com/job/unity8-ci/1245/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-saucy/4461
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-touch/2221/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-saucy/2054
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-amd64-ci/268
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-ci/1245
        deb: http://jenkins.qa.ubuntu.com/job/unity8-saucy-armhf-ci/1245/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-saucy-i386-ci/1244
    SUCCESS: http://jenkins.qa.ubuntu.com/job/autopilot-testrunner-otto-saucy/743
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-amd64/336
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-amd64/336/artifact/work/output/*zip*/output.zip
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/2223
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-saucy-armhf/2223/artifact/work/output/*zip*/output.zip
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-maguro/1895/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-runner-mako/1912

Click here to trigger a rebuild:
http://s-jenkins:8080/job/unity8-ci/1245/rebuild

review: Needs Fixing (continuous-integration)

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Components/Tile.qml'
2--- Components/Tile.qml 2013-08-05 15:02:05 +0000
3+++ Components/Tile.qml 2013-10-03 11:50:08 +0000
4@@ -18,70 +18,13 @@
5 import Ubuntu.Components 0.1
6
7 AbstractButton {
8- id: root
9- property alias source: image.source
10- property alias fillMode: image.fillMode
11- property alias horizontalAlignment: image.horizontalAlignment
12- property alias verticalAlignment: image.verticalAlignment
13- property alias text: label.text
14+ property url source
15+ property int fillMode
16+ property int horizontalAlignment
17+ property int verticalAlignment
18+ property string text
19 property int imageWidth
20 property int imageHeight
21
22- UbuntuShape {
23- id: icon
24- anchors {
25- top: parent.top
26- horizontalCenter: parent.horizontalCenter
27- }
28- radius: "medium"
29- width: imageWidth
30- height: imageHeight
31- image: Image {
32- id: image
33- objectName: "image"
34- sourceSize { width: icon.width; height: icon.height }
35- asynchronous: true
36- cache: false
37- }
38- }
39-
40- UbuntuShape {
41- id: borderPressed
42- objectName: "borderPressed"
43-
44- anchors.fill: icon
45- radius: "medium"
46- borderSource: "radius_pressed.sci"
47- opacity: root.pressed ? 1.0 : 0.0
48- Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutQuint } }
49- }
50-
51- Item {
52- anchors {
53- left: parent.left
54- right: parent.right
55- top: icon.bottom
56- }
57- height: units.gu(2)
58-
59- Label {
60- id: label
61- objectName: "label"
62- anchors {
63- baseline: parent.bottom
64- left: parent.left
65- right: parent.right
66- leftMargin: units.gu(1)
67- rightMargin: units.gu(1)
68- }
69-
70- color: Theme.palette.selected.backgroundText
71- opacity: 0.9
72- style: Text.Raised
73- styleColor: "black"
74- fontSize: "small"
75- elide: Text.ElideMiddle
76- horizontalAlignment: Text.AlignHCenter
77- }
78- }
79+ style: TileStyle {}
80 }
81
82=== added file 'Components/TileStyle.qml'
83--- Components/TileStyle.qml 1970-01-01 00:00:00 +0000
84+++ Components/TileStyle.qml 2013-10-03 11:50:08 +0000
85@@ -0,0 +1,87 @@
86+/*
87+ * Copyright (C) 2013 Canonical, Ltd.
88+ *
89+ * This program is free software; you can redistribute it and/or modify
90+ * it under the terms of the GNU General Public License as published by
91+ * the Free Software Foundation; version 3.
92+ *
93+ * This program is distributed in the hope that it will be useful,
94+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
95+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
96+ * GNU General Public License for more details.
97+ *
98+ * You should have received a copy of the GNU General Public License
99+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
100+ */
101+
102+import QtQuick 2.0
103+import Ubuntu.Components 0.1
104+
105+Item {
106+ id: tile
107+
108+ anchors.fill: parent
109+
110+ UbuntuShape {
111+ id: icon
112+ anchors {
113+ top: parent.top
114+ horizontalCenter: parent.horizontalCenter
115+ }
116+ radius: "medium"
117+ width: styledItem.imageWidth
118+ height: styledItem.imageHeight
119+ image: Image {
120+ id: image
121+ objectName: "image"
122+ sourceSize { width: icon.width; height: icon.height }
123+ asynchronous: true
124+ cache: false
125+ source: styledItem.source
126+ fillMode: styledItem.fillMode
127+ horizontalAlignment: styledItem.horizontalAlignment
128+ verticalAlignment: styledItem.verticalAlignment
129+ }
130+ }
131+
132+ UbuntuShape {
133+ id: borderPressed
134+ objectName: "borderPressed"
135+
136+ anchors.fill: icon
137+ radius: "medium"
138+ borderSource: "radius_pressed.sci"
139+ opacity: styledItem.pressed ? 1.0 : 0.0
140+ Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutQuint } }
141+ }
142+
143+ Item {
144+ anchors {
145+ left: parent.left
146+ right: parent.right
147+ top: icon.bottom
148+ }
149+ height: units.gu(2)
150+
151+ Label {
152+ id: label
153+ objectName: "label"
154+ anchors {
155+ baseline: parent.bottom
156+ left: parent.left
157+ right: parent.right
158+ leftMargin: units.gu(1)
159+ rightMargin: units.gu(1)
160+ }
161+
162+ color: Theme.palette.selected.backgroundText
163+ opacity: 0.9
164+ style: Text.Raised
165+ styleColor: "black"
166+ fontSize: "small"
167+ elide: Text.ElideMiddle
168+ horizontalAlignment: Text.AlignHCenter
169+ text: styledItem.text
170+ }
171+ }
172+}
173
174=== modified file 'Dash/Generic/GenericFilterGrid.qml'
175--- Dash/Generic/GenericFilterGrid.qml 2013-09-05 10:02:00 +0000
176+++ Dash/Generic/GenericFilterGrid.qml 2013-10-03 11:50:08 +0000
177@@ -39,9 +39,7 @@
178 text: model.title
179 imageWidth: filtergrid.iconWidth
180 imageHeight: filtergrid.iconHeight
181-
182 source: model.icon
183-
184 fillMode: Image.PreserveAspectCrop
185
186 onClicked: {
187
188=== added file 'Dash/Generic/GenericFilterGridDashPlugin.qml'
189--- Dash/Generic/GenericFilterGridDashPlugin.qml 1970-01-01 00:00:00 +0000
190+++ Dash/Generic/GenericFilterGridDashPlugin.qml 2013-10-03 11:50:08 +0000
191@@ -0,0 +1,47 @@
192+/*
193+ * Copyright (C) 2013 Canonical, Ltd.
194+ *
195+ * This program is free software; you can redistribute it and/or modify
196+ * it under the terms of the GNU General Public License as published by
197+ * the Free Software Foundation; version 3.
198+ *
199+ * This program is distributed in the hope that it will be useful,
200+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
201+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
202+ * GNU General Public License for more details.
203+ *
204+ * You should have received a copy of the GNU General Public License
205+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
206+ */
207+
208+import QtQuick 2.0
209+import Ubuntu.Components 0.1
210+import "../../Components"
211+
212+GenericFilterGrid {
213+ id: filtergrid
214+
215+ delegate: Tile {
216+ id: tile
217+ objectName: "delegate" + index
218+ width: filtergrid.cellWidth
219+ height: filtergrid.cellHeight
220+ text: model.title
221+ imageWidth: filtergrid.iconWidth
222+ imageHeight: filtergrid.iconHeight
223+ source: model.icon
224+ fillMode: Image.PreserveAspectCrop
225+
226+ style: TileStyleDashPlugin {}
227+
228+ onClicked: {
229+ var data = { model: model }
230+ filtergrid.clicked(index, data, tile.y)
231+ }
232+
233+ onPressAndHold: {
234+ var data = { model: model }
235+ filtergrid.pressAndHold(index, data, tile.y)
236+ }
237+ }
238+}
239
240=== added file 'Dash/Generic/TileStyleDashPlugin.qml'
241--- Dash/Generic/TileStyleDashPlugin.qml 1970-01-01 00:00:00 +0000
242+++ Dash/Generic/TileStyleDashPlugin.qml 2013-10-03 11:50:08 +0000
243@@ -0,0 +1,87 @@
244+/*
245+ * Copyright (C) 2013 Canonical, Ltd.
246+ *
247+ * This program is free software; you can redistribute it and/or modify
248+ * it under the terms of the GNU General Public License as published by
249+ * the Free Software Foundation; version 3.
250+ *
251+ * This program is distributed in the hope that it will be useful,
252+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
253+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
254+ * GNU General Public License for more details.
255+ *
256+ * You should have received a copy of the GNU General Public License
257+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
258+ */
259+
260+import QtQuick 2.0
261+import Ubuntu.Components 0.1
262+
263+Item {
264+ id: tile
265+
266+ anchors.fill: parent
267+
268+ Item {
269+ id: icon
270+ anchors {
271+ top: parent.top
272+ horizontalCenter: parent.horizontalCenter
273+ }
274+ width: styledItem.imageWidth
275+ height: styledItem.imageHeight
276+
277+ Image {
278+ id: image
279+ objectName: "image"
280+ sourceSize { width: icon.width; height: icon.height }
281+ asynchronous: true
282+ cache: false
283+ source: styledItem.source
284+ fillMode: styledItem.fillMode
285+ horizontalAlignment: styledItem.horizontalAlignment
286+ verticalAlignment: styledItem.verticalAlignment
287+ }
288+ }
289+
290+ UbuntuShape {
291+ id: borderPressed
292+ objectName: "borderPressed"
293+
294+ anchors.fill: icon
295+ radius: "medium"
296+ borderSource: "radius_pressed.sci"
297+ opacity: styledItem.pressed ? 1.0 : 0.0
298+ Behavior on opacity { NumberAnimation { duration: 200; easing.type: Easing.OutQuint } }
299+ }
300+
301+ Item {
302+ anchors {
303+ left: parent.left
304+ right: parent.right
305+ top: icon.bottom
306+ }
307+ height: units.gu(2)
308+
309+ Label {
310+ id: label
311+ objectName: "label"
312+ anchors {
313+ baseline: parent.bottom
314+ left: parent.left
315+ right: parent.right
316+ leftMargin: units.gu(1)
317+ rightMargin: units.gu(1)
318+ }
319+
320+ color: Theme.palette.selected.backgroundText
321+ opacity: 0.9
322+ style: Text.Raised
323+ styleColor: "black"
324+ fontSize: "small"
325+ elide: Text.ElideMiddle
326+ horizontalAlignment: Text.AlignHCenter
327+ text: styledItem.text
328+ }
329+ }
330+}
331
332=== modified file 'Dash/GenericScopeView.qml'
333--- Dash/GenericScopeView.qml 2013-10-03 11:50:07 +0000
334+++ Dash/GenericScopeView.qml 2013-10-03 11:50:08 +0000
335@@ -209,6 +209,12 @@
336 switch (contentType) {
337 case "video": return "Generic/GenericFilterGridPotrait.qml";
338 case "music": return "Music/MusicFilterGrid.qml";
339+ case "apps": {
340+ if (rendererHint == "toggled")
341+ return "Generic/GenericFilterGridDashPlugin.qml";
342+ else
343+ return "Generic/GenericFilterGrid.qml";
344+ }
345 default: return "Generic/GenericFilterGrid.qml";
346 }
347 }

Subscribers

People subscribed via source and target branches