Merge lp:~zsombi/ubuntu-ui-toolkit/04-apply-styleset into lp:ubuntu-ui-toolkit/staging

Proposed by Zsombor Egri on 2015-03-10
Status: Merged
Approved by: Tim Peeters on 2015-04-16
Approved revision: 1466
Merged at revision: 1479
Proposed branch: lp:~zsombi/ubuntu-ui-toolkit/04-apply-styleset
Merge into: lp:ubuntu-ui-toolkit/staging
Prerequisite: lp:~zsombi/ubuntu-ui-toolkit/03-styleditem-styleset
Diff against target: 2589 lines (+325/-321)
80 files modified
examples/locale/locale.qml (+4/-4)
examples/ubuntu-ui-toolkit-gallery/ListItems.qml (+3/-3)
examples/ubuntu-ui-toolkit-gallery/Pickers.qml (+4/-4)
examples/ubuntu-ui-toolkit-gallery/Styles.qml (+4/-3)
examples/ubuntu-ui-toolkit-gallery/UbuntuShape.qml (+9/-9)
modules/Ubuntu/Components/10/Button.qml (+3/-3)
modules/Ubuntu/Components/11/Button.qml (+3/-3)
modules/Ubuntu/Components/ActivityIndicator.qml (+2/-2)
modules/Ubuntu/Components/AppHeader.qml (+4/-4)
modules/Ubuntu/Components/CheckBox.qml (+2/-2)
modules/Ubuntu/Components/ComboButton.qml (+2/-2)
modules/Ubuntu/Components/Label.qml (+2/-2)
modules/Ubuntu/Components/ListItems/Caption.qml (+3/-3)
modules/Ubuntu/Components/ListItems/Empty.qml (+3/-3)
modules/Ubuntu/Components/ListItems/ItemSelector.qml (+4/-4)
modules/Ubuntu/Components/ListItems/LabelVisual.qml (+4/-4)
modules/Ubuntu/Components/ListItems/ProgressionVisual.qml (+3/-3)
modules/Ubuntu/Components/ListItems/Standard.qml (+4/-4)
modules/Ubuntu/Components/ListItems/ThinDivider.qml (+3/-3)
modules/Ubuntu/Components/ListItems/ValueSelector.qml (+3/-3)
modules/Ubuntu/Components/MainViewBase.qml (+8/-8)
modules/Ubuntu/Components/OptionSelector.qml (+4/-4)
modules/Ubuntu/Components/PageHeadConfiguration11.qml (+3/-3)
modules/Ubuntu/Components/Panel.qml (+5/-5)
modules/Ubuntu/Components/Pickers/DatePicker.qml (+3/-3)
modules/Ubuntu/Components/Pickers/Dialer.qml (+4/-3)
modules/Ubuntu/Components/Pickers/DialerHand.qml (+5/-4)
modules/Ubuntu/Components/Pickers/Picker.qml (+3/-3)
modules/Ubuntu/Components/Pickers/PickerDelegate.qml (+3/-3)
modules/Ubuntu/Components/Pickers/PickerPanel.qml (+3/-3)
modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml (+3/-3)
modules/Ubuntu/Components/Popups/Dialog.qml (+3/-3)
modules/Ubuntu/Components/Popups/Popover.qml (+4/-4)
modules/Ubuntu/Components/Popups/SheetBase.qml (+4/-3)
modules/Ubuntu/Components/ProgressBar10.qml (+2/-2)
modules/Ubuntu/Components/PullToRefresh.qml (+3/-3)
modules/Ubuntu/Components/Scrollbar.qml (+2/-2)
modules/Ubuntu/Components/Slider.qml (+2/-2)
modules/Ubuntu/Components/StyledItem.qml (+3/-3)
modules/Ubuntu/Components/Switch.qml (+2/-2)
modules/Ubuntu/Components/TabBar.qml (+2/-2)
modules/Ubuntu/Components/TextArea.qml (+2/-2)
modules/Ubuntu/Components/TextCursor.qml (+3/-3)
modules/Ubuntu/Components/TextField.qml (+4/-4)
modules/Ubuntu/Components/TextInputPopover.qml (+3/-3)
modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml (+4/-4)
modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml (+6/-6)
modules/Ubuntu/Components/Themes/Ambiance/DialerHandStyle.qml (+3/-3)
modules/Ubuntu/Components/Themes/Ambiance/HeaderStyle.qml (+3/-3)
modules/Ubuntu/Components/Themes/Ambiance/ListItemStyle.qml (+3/-3)
modules/Ubuntu/Components/Themes/Ambiance/OverflowPanel.qml (+2/-2)
modules/Ubuntu/Components/Themes/Ambiance/PageHeadButton.qml (+3/-3)
modules/Ubuntu/Components/Themes/Ambiance/PageHeadStyle.qml (+3/-3)
modules/Ubuntu/Components/Themes/Ambiance/PickerStyle.qml (+3/-3)
modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml (+4/-4)
modules/Ubuntu/Components/Themes/Ambiance/ScrollbarStyle.qml (+3/-3)
modules/Ubuntu/Components/Themes/Ambiance/SliderStyle.qml (+5/-5)
modules/Ubuntu/Components/Themes/Ambiance/SwitchStyle.qml (+5/-5)
modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml (+5/-5)
modules/Ubuntu/Components/Themes/Ambiance/TextAreaStyle.qml (+6/-6)
modules/Ubuntu/Components/Themes/Ambiance/ToolbarStyle.qml (+3/-3)
modules/Ubuntu/Components/Themes/Palette.qml (+3/-3)
modules/Ubuntu/Components/Toolbar.qml (+2/-2)
modules/Ubuntu/Components/ToolbarButton.qml (+2/-2)
modules/Ubuntu/Components/plugin/ucdeprecatedtheme.cpp (+14/-1)
modules/Ubuntu/Components/plugin/ucdeprecatedtheme.h (+4/-1)
modules/Ubuntu/Components/plugin/uclistitem.cpp (+24/-26)
modules/Ubuntu/Components/plugin/uclistitem.h (+2/-1)
modules/Ubuntu/Components/plugin/uclistitem_p.h (+4/-3)
modules/Ubuntu/Components/plugin/ucstyleditembase.cpp (+10/-32)
modules/Ubuntu/Components/plugin/ucstyleditembase.h (+1/-1)
modules/Ubuntu/Components/plugin/ucstyleditembase_p.h (+4/-2)
modules/Ubuntu/Components/plugin/uctheme.cpp (+14/-0)
modules/Ubuntu/Components/plugin/uctheme.h (+3/-0)
tests/unit/tst_performance/tst_performance.cpp (+10/-7)
tests/unit_x11/tst_components/tst_app_theming.qml (+4/-4)
tests/unit_x11/tst_components/tst_listitem.qml (+3/-3)
tests/unit_x11/tst_components/tst_theming.qml (+5/-7)
tests/unit_x11/tst_deprecated_theme_engine/tst_deprecated_theme_engine.cpp (+1/-0)
tests/unit_x11/tst_subtheming/tst_subtheming.cpp (+2/-17)
To merge this branch: bzr merge lp:~zsombi/ubuntu-ui-toolkit/04-apply-styleset
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve on 2015-04-16
Tim Peeters 2015-03-10 Approve on 2015-04-16
Review via email: mp+252467@code.launchpad.net

Commit Message

Applying sub-theming on toolkit.

To post a comment you must log in.
1459. By Zsombor Egri on 2015-04-09

prereq sync

1460. By Zsombor Egri on 2015-04-09

license year updated, deprecations marked, 1.3 imported where theme is used.

1461. By Zsombor Egri on 2015-04-10

prereq sync

1462. By Zsombor Egri on 2015-04-14

prereq sync

1463. By Zsombor Egri on 2015-04-14

adjusting changed styles to use the new theming

1464. By Zsombor Egri on 2015-04-14

removing subthemingEnabled from StyledItemBase

1465. By Zsombor Egri on 2015-04-14

fix theme change updates on the colors

Tim Peeters (tpeeters) wrote :

1973 + showDeprecatedNote("Theme.name is deprecated. Use StyleSet instead.");

StyleSet is deprecated (used in multiple places)

1466. By Zsombor Egri on 2015-04-16

Styleset->ThemeSettings

Tim Peeters (tpeeters) wrote :

looks good.

review: Approve
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'examples/locale/locale.qml'
2--- examples/locale/locale.qml 2015-03-03 13:47:48 +0000
3+++ examples/locale/locale.qml 2015-04-16 13:25:32 +0000
4@@ -1,5 +1,5 @@
5 /*
6- * Copyright 2012 Canonical Ltd.
7+ * Copyright 2015 Canonical Ltd.
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License as published by
11@@ -16,7 +16,7 @@
12 */
13
14 import QtQuick 2.0
15-import Ubuntu.Components 1.2
16+import Ubuntu.Components 1.3
17 import Ubuntu.Components.ListItems 1.0 as ListItem
18
19 /*!
20@@ -89,7 +89,7 @@
21 highlight: Rectangle {
22 height: units.gu(2)
23 width: view.width
24- color: Theme.palette.selected.background
25+ color: theme.palette.selected.background
26 }
27 }
28 }
29@@ -100,7 +100,7 @@
30 leftMargin: units.gu(0.5)
31 bottom: parent.bottom
32 }
33- color: Theme.palette.normal.base
34+ color: theme.palette.normal.base
35 width: parent.width
36 Column {
37 anchors.fill: parent
38
39=== modified file 'examples/ubuntu-ui-toolkit-gallery/ListItems.qml'
40--- examples/ubuntu-ui-toolkit-gallery/ListItems.qml 2015-03-11 17:10:20 +0000
41+++ examples/ubuntu-ui-toolkit-gallery/ListItems.qml 2015-04-16 13:25:32 +0000
42@@ -1,5 +1,5 @@
43 /*
44- * Copyright 2013 Canonical Ltd.
45+ * Copyright 2015 Canonical Ltd.
46 *
47 * This program is free software; you can redistribute it and/or modify
48 * it under the terms of the GNU Lesser General Public License as published by
49@@ -15,7 +15,7 @@
50 */
51
52 import QtQuick 2.4
53-import Ubuntu.Components 1.2 as Toolkit
54+import Ubuntu.Components 1.3 as Toolkit
55 import Ubuntu.Components.ListItems 1.0 as ListItem
56
57 Template {
58@@ -207,7 +207,7 @@
59 confirmRemoval: (index % 2)
60 backgroundIndicator: Rectangle {
61 anchors.fill: parent
62- color: Theme.palette.normal.base
63+ color: theme.palette.normal.base
64 }
65 }
66
67
68=== modified file 'examples/ubuntu-ui-toolkit-gallery/Pickers.qml'
69--- examples/ubuntu-ui-toolkit-gallery/Pickers.qml 2015-03-11 17:10:20 +0000
70+++ examples/ubuntu-ui-toolkit-gallery/Pickers.qml 2015-04-16 13:25:32 +0000
71@@ -1,5 +1,5 @@
72 /*
73- * Copyright 2013 Canonical Ltd.
74+ * Copyright 2015 Canonical Ltd.
75 *
76 * This program is free software; you can redistribute it and/or modify
77 * it under the terms of the GNU Lesser General Public License as published by
78@@ -15,8 +15,8 @@
79 */
80
81 import QtQuick 2.0
82-import Ubuntu.Components 0.1
83-import Ubuntu.Components.Pickers 0.1
84+import Ubuntu.Components 1.3
85+import Ubuntu.Components.Pickers 1.0
86
87 Template {
88 objectName: "pickersTemplate"
89@@ -158,7 +158,7 @@
90 width: height
91 height: units.gu(3)
92 radius: width / 2
93- color: Theme.palette.normal.background
94+ color: theme.palette.normal.background
95 antialiasing: true
96 Label {
97 text: Math.round(selector.value)
98
99=== modified file 'examples/ubuntu-ui-toolkit-gallery/Styles.qml'
100--- examples/ubuntu-ui-toolkit-gallery/Styles.qml 2015-03-03 13:47:48 +0000
101+++ examples/ubuntu-ui-toolkit-gallery/Styles.qml 2015-04-16 13:25:32 +0000
102@@ -1,5 +1,5 @@
103 /*
104- * Copyright 2014 Canonical Ltd.
105+ * Copyright 2015 Canonical Ltd.
106 *
107 * This program is free software; you can redistribute it and/or modify
108 * it under the terms of the GNU Lesser General Public License as published by
109@@ -15,7 +15,7 @@
110 */
111
112 import QtQuick 2.4
113-import Ubuntu.Components 1.1
114+import Ubuntu.Components 1.3
115
116 Template {
117 objectName: "stylesTemplate"
118@@ -43,6 +43,7 @@
119 OptionSelector {
120 model: [ 'Ambiance', 'SuruDark' ]
121 expanded: true
122- onSelectedIndexChanged: Theme.name = 'Ubuntu.Components.Themes.%1'.arg(model[selectedIndex])
123+ selectedIndex: (theme.name == 'Ubuntu.Components.Themes.SuruDark')
124+ onSelectedIndexChanged: theme.name = 'Ubuntu.Components.Themes.%1'.arg(model[selectedIndex])
125 }
126 }
127
128=== modified file 'examples/ubuntu-ui-toolkit-gallery/UbuntuShape.qml'
129--- examples/ubuntu-ui-toolkit-gallery/UbuntuShape.qml 2015-03-03 16:21:20 +0000
130+++ examples/ubuntu-ui-toolkit-gallery/UbuntuShape.qml 2015-04-16 13:25:32 +0000
131@@ -1,5 +1,5 @@
132 /*
133- * Copyright 2013 Canonical Ltd.
134+ * Copyright 2015 Canonical Ltd.
135 *
136 * This program is free software; you can redistribute it and/or modify
137 * it under the terms of the GNU Lesser General Public License as published by
138@@ -14,8 +14,8 @@
139 * along with this program. If not, see <http://www.gnu.org/licenses/>.
140 */
141
142-import QtQuick 2.2
143-import Ubuntu.Components 1.2
144+import QtQuick 2.4
145+import Ubuntu.Components 1.3
146
147 Template {
148 objectName: "ubuntuShapesTemplate"
149@@ -71,27 +71,27 @@
150 UbuntuShape {
151 objectName: "ubuntushape_radius_small"
152
153- backgroundColor: Theme.palette.normal.foreground
154+ backgroundColor: theme.palette.normal.foreground
155 radius: "small"
156
157 Label {
158 anchors.centerIn: parent
159 text: "small"
160 fontSize: "x-small"
161- color: Theme.palette.normal.foregroundText
162+ color: theme.palette.normal.foregroundText
163 }
164 }
165
166 UbuntuShape {
167 objectName: "ubuntushape_radius_medium"
168- backgroundColor: Theme.palette.normal.foreground
169+ backgroundColor: theme.palette.normal.foreground
170 radius: "medium"
171
172 Label {
173 anchors.centerIn: parent
174 text: "medium"
175 fontSize: "x-small"
176- color: Theme.palette.normal.foregroundText
177+ color: theme.palette.normal.foregroundText
178 }
179 }
180 }
181@@ -103,7 +103,7 @@
182
183 UbuntuShape {
184 objectName: "ubuntushape_sizes_15_6"
185- backgroundColor: Theme.palette.normal.foreground
186+ backgroundColor: theme.palette.normal.foreground
187 width: units.gu(15)
188 height: units.gu(6)
189 anchors.verticalCenter: parent.verticalCenter
190@@ -111,7 +111,7 @@
191
192 UbuntuShape {
193 objectName: "ubuntushape_sizes_10_14"
194- backgroundColor: Theme.palette.normal.foreground
195+ backgroundColor: theme.palette.normal.foreground
196 width: units.gu(10)
197 height: units.gu(14)
198 }
199
200=== modified file 'modules/Ubuntu/Components/10/Button.qml'
201--- modules/Ubuntu/Components/10/Button.qml 2015-03-03 13:47:48 +0000
202+++ modules/Ubuntu/Components/10/Button.qml 2015-04-16 13:25:32 +0000
203@@ -1,5 +1,5 @@
204 /*
205- * Copyright 2012 Canonical Ltd.
206+ * Copyright 2015 Canonical Ltd.
207 *
208 * This program is free software; you can redistribute it and/or modify
209 * it under the terms of the GNU Lesser General Public License as published by
210@@ -15,7 +15,7 @@
211 */
212
213 import QtQuick 2.4
214-import Ubuntu.Components 1.2
215+import Ubuntu.Components 1.3
216
217 /*!
218 \internal
219@@ -32,5 +32,5 @@
220
221 property string iconPosition: "left"
222
223- style: Theme.createStyleComponent("ButtonStyle.qml", button)
224+ style: theme.createStyleComponent("ButtonStyle.qml", button)
225 }
226
227=== modified file 'modules/Ubuntu/Components/11/Button.qml'
228--- modules/Ubuntu/Components/11/Button.qml 2015-03-03 13:47:48 +0000
229+++ modules/Ubuntu/Components/11/Button.qml 2015-04-16 13:25:32 +0000
230@@ -1,5 +1,5 @@
231 /*
232- * Copyright 2014 Canonical Ltd.
233+ * Copyright 2015 Canonical Ltd.
234 *
235 * This program is free software; you can redistribute it and/or modify
236 * it under the terms of the GNU Lesser General Public License as published by
237@@ -15,7 +15,7 @@
238 */
239
240 import QtQuick 2.4
241-import Ubuntu.Components 1.2
242+import Ubuntu.Components 1.3
243
244 /*!
245 \qmltype Button
246@@ -121,5 +121,5 @@
247 */
248 property string iconPosition: "left"
249
250- style: Theme.createStyleComponent("ButtonStyle.qml", button)
251+ style: theme.createStyleComponent("ButtonStyle.qml", button)
252 }
253
254=== modified file 'modules/Ubuntu/Components/ActivityIndicator.qml'
255--- modules/Ubuntu/Components/ActivityIndicator.qml 2015-03-03 13:47:48 +0000
256+++ modules/Ubuntu/Components/ActivityIndicator.qml 2015-04-16 13:25:32 +0000
257@@ -1,5 +1,5 @@
258 /*
259- * Copyright 2012 Canonical Ltd.
260+ * Copyright 2015 Canonical Ltd.
261 *
262 * This program is free software; you can redistribute it and/or modify
263 * it under the terms of the GNU Lesser General Public License as published by
264@@ -55,5 +55,5 @@
265 implicitWidth: units.gu(3)
266 implicitHeight: units.gu(3)
267
268- style: Theme.createStyleComponent("ActivityIndicatorStyle.qml", indicator)
269+ style: theme.createStyleComponent("ActivityIndicatorStyle.qml", indicator)
270 }
271
272=== modified file 'modules/Ubuntu/Components/AppHeader.qml'
273--- modules/Ubuntu/Components/AppHeader.qml 2015-03-20 15:41:55 +0000
274+++ modules/Ubuntu/Components/AppHeader.qml 2015-04-16 13:25:32 +0000
275@@ -1,5 +1,5 @@
276 /*
277- * Copyright 2013-2015 Canonical Ltd.
278+ * Copyright 2015 Canonical Ltd.
279 *
280 * This program is free software; you can redistribute it and/or modify
281 * it under the terms of the GNU Lesser General Public License as published by
282@@ -15,7 +15,7 @@
283 */
284
285 import QtQuick 2.4
286-import Ubuntu.Components 1.2 as Components
287+import Ubuntu.Components 1.3 as Components
288
289 /*!
290 \internal
291@@ -342,6 +342,6 @@
292 }
293 }
294
295- style: header.useDeprecatedToolbar ? Theme.createStyleComponent("HeaderStyle.qml", header) :
296- Theme.createStyleComponent("PageHeadStyle.qml", header)
297+ style: header.useDeprecatedToolbar ? theme.createStyleComponent("HeaderStyle.qml", header) :
298+ theme.createStyleComponent("PageHeadStyle.qml", header)
299 }
300
301=== modified file 'modules/Ubuntu/Components/CheckBox.qml'
302--- modules/Ubuntu/Components/CheckBox.qml 2015-03-05 09:35:06 +0000
303+++ modules/Ubuntu/Components/CheckBox.qml 2015-04-16 13:25:32 +0000
304@@ -1,5 +1,5 @@
305 /*
306- * Copyright 2012 Canonical Ltd.
307+ * Copyright 2015 Canonical Ltd.
308 *
309 * This program is free software; you can redistribute it and/or modify
310 * it under the terms of the GNU Lesser General Public License as published by
311@@ -49,5 +49,5 @@
312 */
313 onTriggered: checked = !checked
314
315- style: Theme.createStyleComponent("CheckBoxStyle.qml", checkBox)
316+ style: theme.createStyleComponent("CheckBoxStyle.qml", checkBox)
317 }
318
319=== modified file 'modules/Ubuntu/Components/ComboButton.qml'
320--- modules/Ubuntu/Components/ComboButton.qml 2015-03-03 13:47:48 +0000
321+++ modules/Ubuntu/Components/ComboButton.qml 2015-04-16 13:25:32 +0000
322@@ -1,5 +1,5 @@
323 /*
324- * Copyright 2014 Canonical Ltd.
325+ * Copyright 2015 Canonical Ltd.
326 *
327 * This program is free software; you can redistribute it and/or modify
328 * it under the terms of the GNU Lesser General Public License as published by
329@@ -248,7 +248,7 @@
330 property color dropdownColor: __styleInstance ? __styleInstance.defaultDropdownColor : color
331
332
333- style: Theme.createStyleComponent("ComboButtonStyle.qml", combo)
334+ style: theme.createStyleComponent("ComboButtonStyle.qml", combo)
335
336 Component.onCompleted: {
337 // update mouse area to report clicks only on the main button area
338
339=== modified file 'modules/Ubuntu/Components/Label.qml'
340--- modules/Ubuntu/Components/Label.qml 2015-03-03 13:47:48 +0000
341+++ modules/Ubuntu/Components/Label.qml 2015-04-16 13:25:32 +0000
342@@ -1,5 +1,5 @@
343 /*
344- * Copyright 2012 Canonical Ltd.
345+ * Copyright 2015 Canonical Ltd.
346 *
347 * This program is free software; you can redistribute it and/or modify
348 * it under the terms of the GNU Lesser General Public License as published by
349@@ -55,5 +55,5 @@
350 property string fontSize: "medium"
351
352 font.pixelSize: FontUtils.sizeToPixels(fontSize)
353- color: Theme.palette.selected.backgroundText
354+ color: theme.palette.selected.backgroundText
355 }
356
357=== modified file 'modules/Ubuntu/Components/ListItems/Caption.qml'
358--- modules/Ubuntu/Components/ListItems/Caption.qml 2015-03-03 13:47:48 +0000
359+++ modules/Ubuntu/Components/ListItems/Caption.qml 2015-04-16 13:25:32 +0000
360@@ -1,5 +1,5 @@
361 /*
362- * Copyright 2012 Canonical Ltd.
363+ * Copyright 2015 Canonical Ltd.
364 *
365 * This program is free software; you can redistribute it and/or modify
366 * it under the terms of the GNU Lesser General Public License as published by
367@@ -15,7 +15,7 @@
368 */
369
370 import QtQuick 2.4
371-import Ubuntu.Components 1.2
372+import Ubuntu.Components 1.3
373
374 /*!
375 \qmltype Caption
376@@ -52,7 +52,7 @@
377 anchors.centerIn: parent
378 width: parent.width - units.gu(1)
379 wrapMode: Text.Wrap
380- color: Theme.palette.normal.backgroundText
381+ color: theme.palette.normal.backgroundText
382 horizontalAlignment: Text.AlignLeft
383 fontSize: "small"
384 }
385
386=== modified file 'modules/Ubuntu/Components/ListItems/Empty.qml'
387--- modules/Ubuntu/Components/ListItems/Empty.qml 2015-03-03 13:47:48 +0000
388+++ modules/Ubuntu/Components/ListItems/Empty.qml 2015-04-16 13:25:32 +0000
389@@ -1,5 +1,5 @@
390 /*
391- * Copyright 2012, 2013, 2014 Canonical Ltd.
392+ * Copyright 2015 Canonical Ltd.
393 *
394 * This program is free software; you can redistribute it and/or modify
395 * it under the terms of the GNU Lesser General Public License as published by
396@@ -15,7 +15,7 @@
397 */
398
399 import QtQuick 2.4
400-import Ubuntu.Components 1.2
401+import Ubuntu.Components 1.3
402
403 /*!
404 \qmltype Empty
405@@ -291,7 +291,7 @@
406 top: parent.top
407 }
408 height: emptyListItem.height - bottomDividerLine.height
409- color: Theme.palette.selected.background
410+ color: theme.palette.selected.background
411 }
412
413 ThinDivider {
414
415=== modified file 'modules/Ubuntu/Components/ListItems/ItemSelector.qml'
416--- modules/Ubuntu/Components/ListItems/ItemSelector.qml 2015-03-03 13:47:48 +0000
417+++ modules/Ubuntu/Components/ListItems/ItemSelector.qml 2015-04-16 13:25:32 +0000
418@@ -1,5 +1,5 @@
419 /*
420- * Copyright 2012 Canonical Ltd.
421+ * Copyright 2015 Canonical Ltd.
422 *
423 * This program is free software; you can redistribute it and/or modify
424 * it under the terms of the GNU Lesser General Public License as published by
425@@ -16,7 +16,7 @@
426
427 import QtQuick 2.4
428 import "." as ListItem
429-import Ubuntu.Components 1.2
430+import Ubuntu.Components 1.3
431
432 /*!
433 \qmltype ItemSelector
434@@ -207,7 +207,7 @@
435
436 readonly property url chevron: __styleInstance.chevron
437 readonly property url tick: __styleInstance.tick
438- readonly property color themeColour: Theme.palette.selected.fieldText
439+ readonly property color themeColour: theme.palette.selected.fieldText
440 readonly property alias colourImage: itemSelector.colourImage
441 property bool currentlyExpanded: expanded || multiSelection
442
443@@ -216,7 +216,7 @@
444 right: parent.right
445 }
446 state: itemSelector.expanded ? "expanded" : "collapsed"
447- style: Theme.createStyleComponent("ListItemOptionSelectorStyle.qml", listContainer)
448+ style: theme.createStyleComponent("ListItemOptionSelectorStyle.qml", listContainer)
449
450 states: [ State {
451 name: "expanded"
452
453=== modified file 'modules/Ubuntu/Components/ListItems/LabelVisual.qml'
454--- modules/Ubuntu/Components/ListItems/LabelVisual.qml 2015-03-03 13:47:48 +0000
455+++ modules/Ubuntu/Components/ListItems/LabelVisual.qml 2015-04-16 13:25:32 +0000
456@@ -1,5 +1,5 @@
457 /*
458- * Copyright 2012 Canonical Ltd.
459+ * Copyright 2015 Canonical Ltd.
460 *
461 * This program is free software; you can redistribute it and/or modify
462 * it under the terms of the GNU Lesser General Public License as published by
463@@ -15,7 +15,7 @@
464 */
465
466 import QtQuick 2.4
467-import Ubuntu.Components 1.2
468+import Ubuntu.Components 1.3
469
470 // internal helper class for text inside the list items.
471 Label {
472@@ -32,7 +32,7 @@
473
474 fontSize: "medium"
475 elide: Text.ElideRight
476- color: selected ? UbuntuColors.orange : secondary ? overlay ? Theme.palette.normal.overlayText : Theme.palette.normal.backgroundText
477- : overlay ? Theme.palette.selected.overlayText : Theme.palette.selected.backgroundText
478+ color: selected ? UbuntuColors.orange : secondary ? overlay ? theme.palette.normal.overlayText : theme.palette.normal.backgroundText
479+ : overlay ? theme.palette.selected.overlayText : theme.palette.selected.backgroundText
480 opacity: label.enabled ? 1.0 : 0.5
481 }
482
483=== modified file 'modules/Ubuntu/Components/ListItems/ProgressionVisual.qml'
484--- modules/Ubuntu/Components/ListItems/ProgressionVisual.qml 2015-03-03 13:47:48 +0000
485+++ modules/Ubuntu/Components/ListItems/ProgressionVisual.qml 2015-04-16 13:25:32 +0000
486@@ -1,5 +1,5 @@
487 /*
488- * Copyright 2012 Canonical Ltd.
489+ * Copyright 2015 Canonical Ltd.
490 *
491 * This program is free software; you can redistribute it and/or modify
492 * it under the terms of the GNU Lesser General Public License as published by
493@@ -15,7 +15,7 @@
494 */
495
496 import QtQuick 2.4
497-import Ubuntu.Components 1.2
498+import Ubuntu.Components 1.3
499
500 // Internal helper class for the visuals of
501 // the progression symbol.
502@@ -25,5 +25,5 @@
503 property bool showSplit: false
504 property real splitMargin
505
506- style: Theme.createStyleComponent("ProgressionVisualStyle.qml", progressionVisual)
507+ style: theme.createStyleComponent("ProgressionVisualStyle.qml", progressionVisual)
508 }
509
510=== modified file 'modules/Ubuntu/Components/ListItems/Standard.qml'
511--- modules/Ubuntu/Components/ListItems/Standard.qml 2015-03-03 13:47:48 +0000
512+++ modules/Ubuntu/Components/ListItems/Standard.qml 2015-04-16 13:25:32 +0000
513@@ -1,5 +1,5 @@
514 /*
515- * Copyright 2012 Canonical Ltd.
516+ * Copyright 2015 Canonical Ltd.
517 *
518 * This program is free software; you can redistribute it and/or modify
519 * it under the terms of the GNU Lesser General Public License as published by
520@@ -15,7 +15,7 @@
521 */
522
523 import QtQuick 2.4
524-import Ubuntu.Components 1.2
525+import Ubuntu.Components 1.3
526
527 /*!
528 \qmltype Standard
529@@ -172,7 +172,7 @@
530 bottom: parent.bottom
531 left: parent.left
532 }
533- color: Theme.palette.selected.background
534+ color: theme.palette.selected.background
535 }
536
537 Rectangle {
538@@ -185,7 +185,7 @@
539 bottom: parent.bottom
540 right: parent.right
541 }
542- color: Theme.palette.selected.background
543+ color: theme.palette.selected.background
544 }
545
546 IconVisual {
547
548=== modified file 'modules/Ubuntu/Components/ListItems/ThinDivider.qml'
549--- modules/Ubuntu/Components/ListItems/ThinDivider.qml 2015-03-03 13:47:48 +0000
550+++ modules/Ubuntu/Components/ListItems/ThinDivider.qml 2015-04-16 13:25:32 +0000
551@@ -1,5 +1,5 @@
552 /*
553- * Copyright 2012 Canonical Ltd.
554+ * Copyright 2015 Canonical Ltd.
555 *
556 * This program is free software; you can redistribute it and/or modify
557 * it under the terms of the GNU Lesser General Public License as published by
558@@ -15,7 +15,7 @@
559 */
560
561 import QtQuick 2.4
562-import Ubuntu.Components 1.2
563+import Ubuntu.Components 1.3
564
565 /*!
566 \qmltype ThinDivider
567@@ -53,7 +53,7 @@
568 // a private property to catch theme background color change
569 // use private property instead of embedding it into a QtObject to avoid further
570 // performance decrease
571- property bool __lightBackground: ColorUtils.luminance(Theme.palette.normal.background) > 0.85
572+ property bool __lightBackground: ColorUtils.luminance(theme.palette.normal.background) > 0.85
573 // use a gradient of 4 steps instead of instantiating two Rectangles for performance reasons
574 gradient: Gradient {
575 GradientStop { position: 0.0; color: __lightBackground ? Qt.rgba(0, 0, 0, 0.1) : Qt.rgba(0, 0, 0, 0.4) }
576
577=== modified file 'modules/Ubuntu/Components/ListItems/ValueSelector.qml'
578--- modules/Ubuntu/Components/ListItems/ValueSelector.qml 2015-03-03 13:47:48 +0000
579+++ modules/Ubuntu/Components/ListItems/ValueSelector.qml 2015-04-16 13:25:32 +0000
580@@ -1,5 +1,5 @@
581 /*
582- * Copyright 2012 Canonical Ltd.
583+ * Copyright 2015 Canonical Ltd.
584 *
585 * This program is free software; you can redistribute it and/or modify
586 * it under the terms of the GNU Lesser General Public License as published by
587@@ -15,7 +15,7 @@
588 */
589
590 import QtQuick 2.4
591-import Ubuntu.Components 1.2
592+import Ubuntu.Components 1.3
593
594 /*!
595 ****DEPRECATED! PLEASE USE ITEM SELECTOR OR FOR THE UBUNTU SHAPE VERSION THE OPTION SELECTOR.****
596@@ -262,7 +262,7 @@
597
598 model: selector.values
599 Rectangle {
600- color: Qt.lighter(Theme.palette.normal.base)
601+ color: Qt.lighter(theme.palette.normal.base)
602 height: valueRepeater.valueHeight
603 width: parent.width
604
605
606=== modified file 'modules/Ubuntu/Components/MainViewBase.qml'
607--- modules/Ubuntu/Components/MainViewBase.qml 2015-03-03 13:47:48 +0000
608+++ modules/Ubuntu/Components/MainViewBase.qml 2015-04-16 13:25:32 +0000
609@@ -1,5 +1,5 @@
610 /*
611- * Copyright 2012-2015 Canonical Ltd.
612+ * Copyright 2015 Canonical Ltd.
613 *
614 * This program is free software; you can redistribute it and/or modify
615 * it under the terms of the GNU Lesser General Public License as published by
616@@ -15,7 +15,7 @@
617 */
618
619 import QtQuick 2.4
620-import Ubuntu.Components 1.2 as Toolkit
621+import Ubuntu.Components 1.3 as Toolkit
622 import Ubuntu.PerformanceMetrics 1.0
623 import QtQuick.Window 2.0
624
625@@ -35,10 +35,10 @@
626 StyledItem {
627 id: background
628 anchors.fill: parent
629- style: Theme.createStyleComponent("MainViewStyle.qml", background)
630+ style: theme.createStyleComponent("MainViewStyle.qml", background)
631
632 property color headerColor: backgroundColor
633- property color backgroundColor: Theme.palette.normal.background
634+ property color backgroundColor: theme.palette.normal.background
635 property color footerColor: backgroundColor
636
637 /*
638@@ -48,12 +48,12 @@
639
640 Qt bug: https://bugreports.qt-project.org/browse/QTBUG-11712
641 */
642- property string theme: (ColorUtils.luminance(backgroundColor) >= 0.85) ?
643+ property string autoThemeName: (ColorUtils.luminance(backgroundColor) >= 0.85) ?
644 "Ambiance" : "SuruDark"
645- onThemeChanged: {
646+ onAutoThemeNameChanged: {
647 // only change the theme if the current one is a system one.
648- if (theme !== "" && (Theme.name.search("Ubuntu.Components.Themes") >= 0)) {
649- Theme.name = "Ubuntu.Components.Themes.%1".arg(theme);
650+ if (autoThemeName !== "" && (theme.name.search("Ubuntu.Components.Themes") >= 0)) {
651+ mainView.theme.name = "Ubuntu.Components.Themes.%1".arg(autoThemeName);
652 }
653 }
654 }
655
656=== modified file 'modules/Ubuntu/Components/OptionSelector.qml'
657--- modules/Ubuntu/Components/OptionSelector.qml 2015-03-03 13:47:48 +0000
658+++ modules/Ubuntu/Components/OptionSelector.qml 2015-04-16 13:25:32 +0000
659@@ -1,5 +1,5 @@
660 /*
661- * Copyright 2012 Canonical Ltd.
662+ * Copyright 2015 Canonical Ltd.
663 *
664 * This program is free software; you can redistribute it and/or modify
665 * it under the terms of the GNU Lesser General Public License as published by
666@@ -16,7 +16,7 @@
667
668 import QtQuick 2.4
669 import "ListItems" as ListItem
670-import Ubuntu.Components 1.2 as Toolkit
671+import Ubuntu.Components 1.3 as Toolkit
672
673 /*!
674 \qmltype OptionSelector
675@@ -216,7 +216,7 @@
676
677 readonly property url chevron: __styleInstance.chevron
678 readonly property url tick: __styleInstance.tick
679- readonly property color themeColour: Theme.palette.selected.fieldText
680+ readonly property color themeColour: theme.palette.selected.fieldText
681 readonly property alias colourImage: optionSelector.colourImage
682 property bool currentlyExpanded: expanded || multiSelection
683
684@@ -225,7 +225,7 @@
685 right: parent.right
686 }
687 state: optionSelector.expanded ? "expanded" : "collapsed"
688- style: Theme.createStyleComponent("OptionSelectorStyle.qml", listContainer)
689+ style: theme.createStyleComponent("OptionSelectorStyle.qml", listContainer)
690 states: [ State {
691 name: "expanded"
692 when: listContainer.currentlyExpanded
693
694=== modified file 'modules/Ubuntu/Components/PageHeadConfiguration11.qml'
695--- modules/Ubuntu/Components/PageHeadConfiguration11.qml 2015-03-20 11:05:40 +0000
696+++ modules/Ubuntu/Components/PageHeadConfiguration11.qml 2015-04-16 13:25:32 +0000
697@@ -1,5 +1,5 @@
698 /*
699- * Copyright 2014-2015 Canonical Ltd.
700+ * Copyright 2015 Canonical Ltd.
701 *
702 * This program is free software; you can redistribute it and/or modify
703 * it under the terms of the GNU Lesser General Public License as published by
704@@ -15,7 +15,7 @@
705 */
706
707 import QtQuick 2.4
708-import Ubuntu.Components 1.1
709+import Ubuntu.Components 1.3
710
711 /*!
712 \internal
713@@ -51,5 +51,5 @@
714 PageHeadSections {
715 id: headSections
716 }
717- property color foregroundColor: Theme.palette.selected.backgroundText
718+ property color foregroundColor: theme.palette.selected.backgroundText
719 }
720
721=== modified file 'modules/Ubuntu/Components/Panel.qml'
722--- modules/Ubuntu/Components/Panel.qml 2015-03-03 13:47:48 +0000
723+++ modules/Ubuntu/Components/Panel.qml 2015-04-16 13:25:32 +0000
724@@ -1,5 +1,5 @@
725 /*
726- * Copyright (C) 2013 Canonical Ltd.
727+ * Copyright (C) 2015 Canonical Ltd.
728 *
729 * This program is free software; you can redistribute it and/or modify
730 * it under the terms of the GNU Lesser General Public License as published by
731@@ -15,7 +15,7 @@
732 */
733
734 import QtQuick 2.4
735-import Ubuntu.Components 1.2 as Toolkit
736+import Ubuntu.Components 1.3 as Toolkit
737
738 /*!
739 \qmltype Panel
740@@ -55,7 +55,7 @@
741
742 Rectangle {
743 anchors.fill: parent
744- color: Theme.palette.normal.overlay
745+ color: theme.palette.normal.overlay
746
747 Button {
748 anchors.centerIn: parent
749@@ -109,7 +109,7 @@
750 import Ubuntu.Components 1.2
751
752 Rectangle {
753- color: Theme.palette.normal.background
754+ color: theme.palette.normal.background
755 width: units.gu(40)
756 height: units.gu(40)
757
758@@ -123,7 +123,7 @@
759 height: units.gu(8)
760
761 Rectangle {
762- color: Theme.palette.normal.overlay
763+ color: theme.palette.normal.overlay
764 anchors.fill: parent
765 Rectangle {
766 width: units.gu(8)
767
768=== modified file 'modules/Ubuntu/Components/Pickers/DatePicker.qml'
769--- modules/Ubuntu/Components/Pickers/DatePicker.qml 2015-03-03 13:47:48 +0000
770+++ modules/Ubuntu/Components/Pickers/DatePicker.qml 2015-04-16 13:25:32 +0000
771@@ -1,5 +1,5 @@
772 /*
773- * Copyright 2013 Canonical Ltd.
774+ * Copyright 2015 Canonical Ltd.
775 *
776 * This program is free software; you can redistribute it and/or modify
777 * it under the terms of the GNU Lesser General Public License as published by
778@@ -15,7 +15,7 @@
779 */
780
781 import QtQuick 2.4
782-import Ubuntu.Components 1.2
783+import Ubuntu.Components 1.3
784
785 /*!
786 \qmltype DatePicker
787@@ -420,7 +420,7 @@
788 }
789 }
790
791- style: Theme.createStyleComponent("DatePickerStyle.qml", datePicker)
792+ style: theme.createStyleComponent("DatePickerStyle.qml", datePicker)
793 Binding {
794 target: __styleInstance
795 property: "view"
796
797=== modified file 'modules/Ubuntu/Components/Pickers/Dialer.qml'
798--- modules/Ubuntu/Components/Pickers/Dialer.qml 2015-03-03 13:47:48 +0000
799+++ modules/Ubuntu/Components/Pickers/Dialer.qml 2015-04-16 13:25:32 +0000
800@@ -1,5 +1,5 @@
801 /*
802- * Copyright 2013 Canonical Ltd.
803+ * Copyright 2015 Canonical Ltd.
804 *
805 * This program is free software; you can redistribute it and/or modify
806 * it under the terms of the GNU Lesser General Public License as published by
807@@ -15,13 +15,14 @@
808 */
809
810 import QtQuick 2.4
811-import Ubuntu.Components 1.2
812+import Ubuntu.Components 1.3
813
814 /*!
815 \qmltype Dialer
816 \inqmlmodule Ubuntu.Components.Pickers 1.0
817 \ingroup ubuntu-pickers
818 \brief Dialer is a phone dialer style picker component.
819+ \deprecated
820
821 The Dialer component is dedicated for value selection where the value is
822 compound of several sections, i.e. hour, minute and second, or integral and
823@@ -144,7 +145,7 @@
824 implicitHeight: size
825 activeFocusOnPress: true
826
827- style: Theme.createStyleComponent("DialerStyle.qml", dialer)
828+ style: theme.createStyleComponent("DialerStyle.qml", dialer)
829
830 Item {
831 id: internal
832
833=== modified file 'modules/Ubuntu/Components/Pickers/DialerHand.qml'
834--- modules/Ubuntu/Components/Pickers/DialerHand.qml 2015-03-03 13:47:48 +0000
835+++ modules/Ubuntu/Components/Pickers/DialerHand.qml 2015-04-16 13:25:32 +0000
836@@ -1,5 +1,5 @@
837 /*
838- * Copyright 2013 Canonical Ltd.
839+ * Copyright 2015 Canonical Ltd.
840 *
841 * This program is free software; you can redistribute it and/or modify
842 * it under the terms of the GNU Lesser General Public License as published by
843@@ -15,13 +15,14 @@
844 */
845
846 import QtQuick 2.4
847-import Ubuntu.Components 1.2
848+import Ubuntu.Components 1.3
849
850 /*!
851 \qmltype DialerHand
852 \inqmlmodule Ubuntu.Components.Pickers 1.0
853 \ingroup ubuntu-pickers
854 \brief DialerHand represents a value selector on a Dialer.
855+ \deprecated
856
857 DialerHand components have meaning only if those are placed inside Dialer
858 components. The dialer hand presents a value selection from the given dialer's
859@@ -65,7 +66,7 @@
860 width: height
861 height: units.gu(3)
862 radius: width / 2
863- color: Theme.palette.normal.background
864+ color: theme.palette.normal.background
865 antialiasing: true
866 Label {
867 text: Math.round(selector.value)
868@@ -142,7 +143,7 @@
869 width: parent.width
870 height: parent.height
871 activeFocusOnPress: true
872- style: Theme.createStyleComponent("DialerHandStyle.qml", dialerHand)
873+ style: theme.createStyleComponent("DialerHandStyle.qml", dialerHand)
874
875 /*! \internal */
876 onParentChanged: {
877
878=== modified file 'modules/Ubuntu/Components/Pickers/Picker.qml'
879--- modules/Ubuntu/Components/Pickers/Picker.qml 2015-03-03 13:47:48 +0000
880+++ modules/Ubuntu/Components/Pickers/Picker.qml 2015-04-16 13:25:32 +0000
881@@ -1,5 +1,5 @@
882 /*
883- * Copyright 2013 Canonical Ltd.
884+ * Copyright 2015 Canonical Ltd.
885 *
886 * This program is free software; you can redistribute it and/or modify
887 * it under the terms of the GNU Lesser General Public License as published by
888@@ -15,7 +15,7 @@
889 */
890
891 import QtQuick 2.4
892-import Ubuntu.Components 1.2
893+import Ubuntu.Components 1.3
894
895 /*!
896 \qmltype Picker
897@@ -159,7 +159,7 @@
898 implicitHeight: units.gu(20)
899 activeFocusOnPress: true
900
901- style: Theme.createStyleComponent("PickerStyle.qml", picker)
902+ style: theme.createStyleComponent("PickerStyle.qml", picker)
903
904 /*! \internal */
905 property int __clickedIndex: -1
906
907=== modified file 'modules/Ubuntu/Components/Pickers/PickerDelegate.qml'
908--- modules/Ubuntu/Components/Pickers/PickerDelegate.qml 2015-03-03 13:47:48 +0000
909+++ modules/Ubuntu/Components/Pickers/PickerDelegate.qml 2015-04-16 13:25:32 +0000
910@@ -1,5 +1,5 @@
911 /*
912- * Copyright 2013 Canonical Ltd.
913+ * Copyright 2015 Canonical Ltd.
914 *
915 * This program is free software; you can redistribute it and/or modify
916 * it under the terms of the GNU Lesser General Public License as published by
917@@ -15,7 +15,7 @@
918 */
919
920 import QtQuick 2.4
921-import Ubuntu.Components 1.2
922+import Ubuntu.Components 1.3
923
924 /*!
925 \qmltype PickerDelegate
926@@ -47,7 +47,7 @@
927 internal.itemList.currentIndex = index;
928 }
929
930- style: Theme.createStyleComponent("PickerDelegateStyle.qml", pickerDelegate)
931+ style: theme.createStyleComponent("PickerDelegateStyle.qml", pickerDelegate)
932
933 QtObject {
934 id: internal
935
936=== modified file 'modules/Ubuntu/Components/Pickers/PickerPanel.qml'
937--- modules/Ubuntu/Components/Pickers/PickerPanel.qml 2015-03-03 13:47:48 +0000
938+++ modules/Ubuntu/Components/Pickers/PickerPanel.qml 2015-04-16 13:25:32 +0000
939@@ -1,5 +1,5 @@
940 /*
941- * Copyright 2014 Canonical Ltd.
942+ * Copyright 2015 Canonical Ltd.
943 *
944 * This program is free software; you can redistribute it and/or modify
945 * it under the terms of the GNU Lesser General Public License as published by
946@@ -17,7 +17,7 @@
947 pragma Singleton
948 import QtQuick 2.4
949 import QtQuick.Window 2.0
950-import Ubuntu.Components 1.2
951+import Ubuntu.Components 1.3
952 import Ubuntu.Components.ListItems 1.0
953 import Ubuntu.Components.Popups 1.0
954
955@@ -200,7 +200,7 @@
956
957 id: panel
958 // no additional styling is needed
959- color: Theme.palette.normal.overlay
960+ color: theme.palette.normal.overlay
961 width: parent.width
962 height: Qt.inputMethod.keyboardRectangle.height > 0 ? Qt.inputMethod.keyboardRectangle.height : units.gu(26)
963 y: parent.height
964
965=== modified file 'modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml'
966--- modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml 2015-03-03 13:47:48 +0000
967+++ modules/Ubuntu/Components/Popups/ActionSelectionPopover.qml 2015-04-16 13:25:32 +0000
968@@ -1,5 +1,5 @@
969 /*
970- * Copyright 2012 Canonical Ltd.
971+ * Copyright 2015 Canonical Ltd.
972 *
973 * This program is free software; you can redistribute it and/or modify
974 * it under the terms of the GNU Lesser General Public License as published by
975@@ -15,7 +15,7 @@
976 */
977
978 import QtQuick 2.4
979-import Ubuntu.Components 1.2
980+import Ubuntu.Components 1.3
981 import Ubuntu.Components.ListItems 1.0
982
983 /*!
984@@ -116,7 +116,7 @@
985 horizontalCenter: parent.horizontalCenter
986 }
987 wrapMode: Text.Wrap
988- color: Theme.palette.normal.overlayText
989+ color: theme.palette.normal.overlayText
990 }
991 /*! \internal */
992 onTriggered: popover.hide()
993
994=== modified file 'modules/Ubuntu/Components/Popups/Dialog.qml'
995--- modules/Ubuntu/Components/Popups/Dialog.qml 2015-03-03 13:47:48 +0000
996+++ modules/Ubuntu/Components/Popups/Dialog.qml 2015-04-16 13:25:32 +0000
997@@ -1,5 +1,5 @@
998 /*
999- * Copyright 2012 Canonical Ltd.
1000+ * Copyright 2015 Canonical Ltd.
1001 *
1002 * This program is free software; you can redistribute it and/or modify
1003 * it under the terms of the GNU Lesser General Public License as published by
1004@@ -15,7 +15,7 @@
1005 */
1006
1007 import QtQuick 2.4
1008-import Ubuntu.Components 1.2
1009+import Ubuntu.Components 1.3
1010 import "internalPopupUtils.js" as InternalPopupUtils
1011
1012 /*!
1013@@ -213,6 +213,6 @@
1014 }
1015 }
1016
1017- style: Theme.createStyleComponent("DialogForegroundStyle.qml", foreground)
1018+ style: theme.createStyleComponent("DialogForegroundStyle.qml", foreground)
1019 }
1020 }
1021
1022=== modified file 'modules/Ubuntu/Components/Popups/Popover.qml'
1023--- modules/Ubuntu/Components/Popups/Popover.qml 2015-03-05 09:35:06 +0000
1024+++ modules/Ubuntu/Components/Popups/Popover.qml 2015-04-16 13:25:32 +0000
1025@@ -1,5 +1,5 @@
1026 /*
1027- * Copyright 2012 Canonical Ltd.
1028+ * Copyright 2015 Canonical Ltd.
1029 *
1030 * This program is free software; you can redistribute it and/or modify
1031 * it under the terms of the GNU Lesser General Public License as published by
1032@@ -16,7 +16,7 @@
1033
1034 import QtQuick 2.4
1035 import "internalPopupUtils.js" as InternalPopupUtils
1036-import Ubuntu.Components 1.2
1037+import Ubuntu.Components 1.3
1038
1039 /*!
1040 \qmltype Popover
1041@@ -37,7 +37,7 @@
1042 import Ubuntu.Components.Popups 1.0
1043
1044 Rectangle {
1045- color: Theme.palette.normal.background
1046+ color: theme.palette.normal.background
1047 width: units.gu(80)
1048 height: units.gu(80)
1049 Component {
1050@@ -237,7 +237,7 @@
1051 signal showCompleted()
1052 signal hideCompleted()
1053
1054- style: Theme.createStyleComponent("PopoverForegroundStyle.qml", foreground)
1055+ style: theme.createStyleComponent("PopoverForegroundStyle.qml", foreground)
1056 }
1057
1058 QtObject {
1059
1060=== modified file 'modules/Ubuntu/Components/Popups/SheetBase.qml'
1061--- modules/Ubuntu/Components/Popups/SheetBase.qml 2015-03-03 13:47:48 +0000
1062+++ modules/Ubuntu/Components/Popups/SheetBase.qml 2015-04-16 13:25:32 +0000
1063@@ -1,5 +1,5 @@
1064 /*
1065- * Copyright 2012 Canonical Ltd.
1066+ * Copyright 2015 Canonical Ltd.
1067 *
1068 * This program is free software; you can redistribute it and/or modify
1069 * it under the terms of the GNU Lesser General Public License as published by
1070@@ -15,7 +15,7 @@
1071 */
1072
1073 import QtQuick 2.4
1074-import Ubuntu.Components 1.2
1075+import Ubuntu.Components 1.3
1076
1077 /*!
1078 \qmltype SheetBase
1079@@ -23,6 +23,7 @@
1080 \inqmlmodule Ubuntu.Components.Popups 1.0
1081 \ingroup ubuntu-popups
1082 \brief Parent class of different types of sheets. Not to be used directly.
1083+ \deprecated
1084
1085 Examples: See subclasses.
1086 \b{Sheets are deprecated. Consider using \l Dialog, \l Popover or \l PageStack instead.}
1087@@ -108,6 +109,6 @@
1088 }
1089 }
1090
1091- style: Theme.createStyleComponent("SheetForegroundStyle.qml", sheet)
1092+ style: theme.createStyleComponent("SheetForegroundStyle.qml", sheet)
1093 }
1094 }
1095
1096=== modified file 'modules/Ubuntu/Components/ProgressBar10.qml'
1097--- modules/Ubuntu/Components/ProgressBar10.qml 2015-03-03 13:47:48 +0000
1098+++ modules/Ubuntu/Components/ProgressBar10.qml 2015-04-16 13:25:32 +0000
1099@@ -1,5 +1,5 @@
1100 /*
1101- * Copyright 2013 Canonical Ltd.
1102+ * Copyright 2015 Canonical Ltd.
1103 *
1104 * This program is free software; you can redistribute it and/or modify
1105 * it under the terms of the GNU Lesser General Public License as published by
1106@@ -64,5 +64,5 @@
1107 */
1108 property real value: 0.5
1109
1110- style: Theme.createStyleComponent("ProgressBarStyle.qml", progressBar)
1111+ style: theme.createStyleComponent("ProgressBarStyle.qml", progressBar)
1112 }
1113
1114=== modified file 'modules/Ubuntu/Components/PullToRefresh.qml'
1115--- modules/Ubuntu/Components/PullToRefresh.qml 2015-03-03 13:47:48 +0000
1116+++ modules/Ubuntu/Components/PullToRefresh.qml 2015-04-16 13:25:32 +0000
1117@@ -1,5 +1,5 @@
1118 /*
1119- * Copyright 2014 Canonical Ltd.
1120+ * Copyright 2015 Canonical Ltd.
1121 *
1122 * This program is free software; you can redistribute it and/or modify
1123 * it under the terms of the GNU Lesser General Public License as published by
1124@@ -15,7 +15,7 @@
1125 */
1126
1127 import QtQuick 2.4
1128-import Ubuntu.Components 1.2
1129+import Ubuntu.Components 1.3
1130
1131 /*!
1132 \qmltype PullToRefresh
1133@@ -222,7 +222,7 @@
1134 */
1135 signal refresh()
1136
1137- style: Theme.createStyleComponent("PullToRefreshStyle.qml", control)
1138+ style: theme.createStyleComponent("PullToRefreshStyle.qml", control)
1139 implicitHeight: __styleInstance.implicitHeight
1140 anchors {
1141 left: target.left
1142
1143=== modified file 'modules/Ubuntu/Components/Scrollbar.qml'
1144--- modules/Ubuntu/Components/Scrollbar.qml 2015-03-03 13:47:48 +0000
1145+++ modules/Ubuntu/Components/Scrollbar.qml 2015-04-16 13:25:32 +0000
1146@@ -1,5 +1,5 @@
1147 /*
1148- * Copyright 2012 Canonical Ltd.
1149+ * Copyright 2015 Canonical Ltd.
1150 *
1151 * This program is free software; you can redistribute it and/or modify
1152 * it under the terms of the GNU Lesser General Public License as published by
1153@@ -145,5 +145,5 @@
1154 }
1155 }
1156
1157- style: Theme.createStyleComponent("ScrollbarStyle.qml", scrollbar)
1158+ style: theme.createStyleComponent("ScrollbarStyle.qml", scrollbar)
1159 }
1160
1161=== modified file 'modules/Ubuntu/Components/Slider.qml'
1162--- modules/Ubuntu/Components/Slider.qml 2015-03-05 09:35:06 +0000
1163+++ modules/Ubuntu/Components/Slider.qml 2015-04-16 13:25:32 +0000
1164@@ -1,5 +1,5 @@
1165 /*
1166- * Copyright 2013 Canonical Ltd.
1167+ * Copyright 2015 Canonical Ltd.
1168 *
1169 * This program is free software; you can redistribute it and/or modify
1170 * it under the terms of the GNU Lesser General Public License as published by
1171@@ -206,5 +206,5 @@
1172 onLiveValueChanged: if (isPressed) slider.requestFocus(Qt.MouseFocusReason)
1173 }
1174
1175- style: Theme.createStyleComponent("SliderStyle.qml", slider)
1176+ style: theme.createStyleComponent("SliderStyle.qml", slider)
1177 }
1178
1179=== modified file 'modules/Ubuntu/Components/StyledItem.qml'
1180--- modules/Ubuntu/Components/StyledItem.qml 2015-03-05 16:09:05 +0000
1181+++ modules/Ubuntu/Components/StyledItem.qml 2015-04-16 13:25:32 +0000
1182@@ -1,5 +1,5 @@
1183 /*
1184- * Copyright 2013 Canonical Ltd.
1185+ * Copyright 2015 Canonical Ltd.
1186 *
1187 * This program is free software; you can redistribute it and/or modify
1188 * it under the terms of the GNU Lesser General Public License as published by
1189@@ -27,13 +27,13 @@
1190
1191 In order to make an Item stylable by the theme, it is enough to make the Item
1192 inherit from StyledItem and set its \l style property to be the result of the
1193- appropriate call to Theme.createStyleComponent().
1194+ appropriate call to theme.createStyleComponent().
1195
1196 Example definition of a custom Item MyItem.qml:
1197 \qml
1198 StyledItem {
1199 id: myItem
1200- style: Theme.createStyleComponent("MyItemStyle.qml", myItem)
1201+ style: theme.createStyleComponent("MyItemStyle.qml", myItem)
1202 }
1203 \endqml
1204
1205
1206=== modified file 'modules/Ubuntu/Components/Switch.qml'
1207--- modules/Ubuntu/Components/Switch.qml 2015-03-05 09:35:06 +0000
1208+++ modules/Ubuntu/Components/Switch.qml 2015-04-16 13:25:32 +0000
1209@@ -1,5 +1,5 @@
1210 /*
1211- * Copyright 2012 Canonical Ltd.
1212+ * Copyright 2015 Canonical Ltd.
1213 *
1214 * This program is free software; you can redistribute it and/or modify
1215 * it under the terms of the GNU Lesser General Public License as published by
1216@@ -40,5 +40,5 @@
1217 */
1218 CheckBox {
1219 id: switchItem
1220- style: Theme.createStyleComponent("SwitchStyle.qml", switchItem)
1221+ style: theme.createStyleComponent("SwitchStyle.qml", switchItem)
1222 }
1223
1224=== modified file 'modules/Ubuntu/Components/TabBar.qml'
1225--- modules/Ubuntu/Components/TabBar.qml 2015-03-03 13:47:48 +0000
1226+++ modules/Ubuntu/Components/TabBar.qml 2015-04-16 13:25:32 +0000
1227@@ -1,5 +1,5 @@
1228 /*
1229- * Copyright 2013 Canonical Ltd.
1230+ * Copyright 2015 Canonical Ltd.
1231 *
1232 * This program is free software; you can redistribute it and/or modify
1233 * it under the terms of the GNU Lesser General Public License as published by
1234@@ -97,7 +97,7 @@
1235 implicitHeight: units.gu(7.5)
1236 activeFocusOnPress: true
1237
1238- style: Theme.createStyleComponent("TabBarStyle.qml", tabBar)
1239+ style: theme.createStyleComponent("TabBarStyle.qml", tabBar)
1240
1241 QtObject {
1242 id: internal
1243
1244=== modified file 'modules/Ubuntu/Components/TextArea.qml'
1245--- modules/Ubuntu/Components/TextArea.qml 2015-03-10 11:49:27 +0000
1246+++ modules/Ubuntu/Components/TextArea.qml 2015-04-16 13:25:32 +0000
1247@@ -803,7 +803,7 @@
1248 }
1249 // hint is shown till user types something in the field
1250 visible: (editor.text == "") && !editor.inputMethodComposing
1251- color: Theme.palette.normal.backgroundText
1252+ color: theme.palette.normal.backgroundText
1253 font: editor.font
1254 elide: Text.ElideRight
1255 wrapMode: Text.WordWrap
1256@@ -873,5 +873,5 @@
1257 }
1258 }
1259
1260- style: Theme.createStyleComponent("TextAreaStyle.qml", control)
1261+ style: theme.createStyleComponent("TextAreaStyle.qml", control)
1262 }
1263
1264=== modified file 'modules/Ubuntu/Components/TextCursor.qml'
1265--- modules/Ubuntu/Components/TextCursor.qml 2015-03-23 17:24:32 +0000
1266+++ modules/Ubuntu/Components/TextCursor.qml 2015-04-16 13:25:32 +0000
1267@@ -1,5 +1,5 @@
1268 /*
1269- * Copyright 2012 Canonical Ltd.
1270+ * Copyright 2015 Canonical Ltd.
1271 *
1272 * This program is free software; you can redistribute it and/or modify
1273 * it under the terms of the GNU Lesser General Public License as published by
1274@@ -15,7 +15,7 @@
1275 */
1276
1277 import QtQuick 2.4
1278-import Ubuntu.Components 1.2 as Ubuntu
1279+import Ubuntu.Components 1.3 as Ubuntu
1280 import Ubuntu.Components.Popups 1.0
1281
1282 Ubuntu.StyledItem {
1283@@ -41,7 +41,7 @@
1284 handler.main.cursorDelegate :
1285 __styleInstance.cursorDelegate
1286
1287- style: Theme.createStyleComponent("TextCursorStyle.qml", cursorItem);
1288+ style: theme.createStyleComponent("TextCursorStyle.qml", cursorItem);
1289
1290 objectName: "textCursor"
1291 //Caret instance from the style.
1292
1293=== modified file 'modules/Ubuntu/Components/TextField.qml'
1294--- modules/Ubuntu/Components/TextField.qml 2015-03-11 15:10:17 +0000
1295+++ modules/Ubuntu/Components/TextField.qml 2015-04-16 13:25:32 +0000
1296@@ -1,5 +1,5 @@
1297 /*
1298- * Copyright 2012 Canonical Ltd.
1299+ * Copyright 2015 Canonical Ltd.
1300 *
1301 * This program is free software; you can redistribute it and/or modify
1302 * it under the terms of the GNU Lesser General Public License as published by
1303@@ -15,7 +15,7 @@
1304 */
1305
1306 import QtQuick 2.4
1307-import Ubuntu.Components 1.2 as Ubuntu
1308+import Ubuntu.Components 1.3 as Ubuntu
1309 import Ubuntu.Components.Popups 1.0
1310
1311 /*!
1312@@ -949,7 +949,7 @@
1313 }
1314 // hint is shown till user types something in the field
1315 visible: (editor.text == "") && !editor.inputMethodComposing
1316- color: Theme.palette.normal.backgroundText
1317+ color: theme.palette.normal.backgroundText
1318 font: editor.font
1319 elide: Text.ElideRight
1320 }
1321@@ -1019,5 +1019,5 @@
1322 cursorPosition = 0;
1323 }
1324
1325- style: Theme.createStyleComponent("TextFieldStyle.qml", control)
1326+ style: theme.createStyleComponent("TextFieldStyle.qml", control)
1327 }
1328
1329=== modified file 'modules/Ubuntu/Components/TextInputPopover.qml'
1330--- modules/Ubuntu/Components/TextInputPopover.qml 2015-03-10 11:49:27 +0000
1331+++ modules/Ubuntu/Components/TextInputPopover.qml 2015-04-16 13:25:32 +0000
1332@@ -1,5 +1,5 @@
1333 /*
1334- * Copyright 2012 Canonical Ltd.
1335+ * Copyright 2015 Canonical Ltd.
1336 *
1337 * This program is free software; you can redistribute it and/or modify
1338 * it under the terms of the GNU Lesser General Public License as published by
1339@@ -15,7 +15,7 @@
1340 */
1341
1342 import QtQuick 2.4
1343-import Ubuntu.Components 1.2
1344+import Ubuntu.Components 1.3
1345 import Ubuntu.Components.Popups 1.0
1346
1347 Popover {
1348@@ -96,7 +96,7 @@
1349 width: Math.max(units.gu(5), implicitWidth) + units.gu(2)
1350 height: units.gu(6)
1351 action: actions[modelData]
1352- style: Theme.createStyleComponent("ToolbarButtonStyle.qml", button)
1353+ style: theme.createStyleComponent("ToolbarButtonStyle.qml", button)
1354 }
1355 }
1356 }
1357
1358=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml'
1359--- modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml 2015-03-03 13:47:48 +0000
1360+++ modules/Ubuntu/Components/Themes/Ambiance/BubbleShape.qml 2015-04-16 13:25:32 +0000
1361@@ -1,5 +1,5 @@
1362 /*
1363- * Copyright 2013-2014 Canonical Ltd.
1364+ * Copyright 2015 Canonical Ltd.
1365 *
1366 * This program is free software; you can redistribute it and/or modify
1367 * it under the terms of the GNU Lesser General Public License as published by
1368@@ -15,7 +15,7 @@
1369 */
1370
1371 import QtQuick 2.4
1372-import Ubuntu.Components 1.2
1373+import Ubuntu.Components 1.3
1374
1375 Item {
1376 id: bubbleShape
1377@@ -28,7 +28,7 @@
1378 /*!
1379 The background color of the bubble.
1380 */
1381- property color color: square ? Theme.palette.normal.background : Theme.palette.normal.overlay
1382+ property color color: square ? theme.palette.normal.background : theme.palette.normal.overlay
1383
1384 property point target
1385 property string direction: "down"
1386@@ -111,7 +111,7 @@
1387 UbuntuShape {
1388 anchors.fill: parent
1389 borderSource: "none"
1390- color: Theme.palette.normal.overlay
1391+ color: theme.palette.normal.overlay
1392 image: bubbleShape.clipContent ? shapeSource : null
1393 visible: !square
1394 }
1395
1396=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml'
1397--- modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml 2015-03-05 19:34:59 +0000
1398+++ modules/Ubuntu/Components/Themes/Ambiance/CheckBoxStyle.qml 2015-04-16 13:25:32 +0000
1399@@ -1,5 +1,5 @@
1400 /*
1401- * Copyright 2013 Canonical Ltd.
1402+ * Copyright 2015 Canonical Ltd.
1403 *
1404 * This program is free software; you can redistribute it and/or modify
1405 * it under the terms of the GNU Lesser General Public License as published by
1406@@ -15,7 +15,7 @@
1407 */
1408
1409 import QtQuick 2.4
1410-import Ubuntu.Components 1.2
1411+import Ubuntu.Components 1.3
1412
1413 Item {
1414 id: checkBoxStyle
1415@@ -28,9 +28,9 @@
1416 /*!
1417 The background color when the checkbox is not checked.
1418 */
1419- property color uncheckedBackgroundColor: Qt.rgba(Theme.palette.normal.foreground.r,
1420- Theme.palette.normal.foreground.g,
1421- Theme.palette.normal.foreground.b, 0.2)
1422+ property color uncheckedBackgroundColor: Qt.rgba(theme.palette.normal.foreground.r,
1423+ theme.palette.normal.foreground.g,
1424+ theme.palette.normal.foreground.b, 0.2)
1425
1426 /*!
1427 The background color when the checkbox is checked.
1428@@ -45,7 +45,7 @@
1429 /*!
1430 The color of the icon.
1431 */
1432- property color iconColor: Theme.palette.normal.foregroundText
1433+ property color iconColor: theme.palette.normal.foregroundText
1434
1435 /*!
1436 The padding between the icon and the border of the thumb.
1437
1438=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/DialerHandStyle.qml'
1439--- modules/Ubuntu/Components/Themes/Ambiance/DialerHandStyle.qml 2015-03-03 13:47:48 +0000
1440+++ modules/Ubuntu/Components/Themes/Ambiance/DialerHandStyle.qml 2015-04-16 13:25:32 +0000
1441@@ -1,5 +1,5 @@
1442 /*
1443- * Copyright 2013 Canonical Ltd.
1444+ * Copyright 2015 Canonical Ltd.
1445 *
1446 * This program is free software; you can redistribute it and/or modify
1447 * it under the terms of the GNU Lesser General Public License as published by
1448@@ -15,7 +15,7 @@
1449 */
1450
1451 import QtQuick 2.4
1452-import Ubuntu.Components 1.2
1453+import Ubuntu.Components 1.3
1454
1455 Item {
1456 // style API
1457@@ -52,7 +52,7 @@
1458 width: styledItem.hand.width
1459 height: styledItem.hand.height
1460 radius: units.gu(1)
1461- color: styledItem.hand.visible ? Theme.palette.normal.baseText : "#00000000"
1462+ color: styledItem.hand.visible ? theme.palette.normal.baseText : "#00000000"
1463 antialiasing: true
1464 }
1465
1466
1467=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/HeaderStyle.qml'
1468--- modules/Ubuntu/Components/Themes/Ambiance/HeaderStyle.qml 2015-03-03 13:47:48 +0000
1469+++ modules/Ubuntu/Components/Themes/Ambiance/HeaderStyle.qml 2015-04-16 13:25:32 +0000
1470@@ -1,5 +1,5 @@
1471 /*
1472- * Copyright 2012 Canonical Ltd.
1473+ * Copyright 2015 Canonical Ltd.
1474 *
1475 * This program is free software; you can redistribute it and/or modify
1476 * it under the terms of the GNU Lesser General Public License as published by
1477@@ -14,7 +14,7 @@
1478 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1479 */
1480 import QtQuick 2.4
1481-import Ubuntu.Components 1.2
1482+import Ubuntu.Components 1.3
1483
1484 Item {
1485 id: headerStyle
1486@@ -38,7 +38,7 @@
1487
1488 property int fontWeight: Font.Light
1489 property string fontSize: "x-large"
1490- property color textColor: Theme.palette.selected.backgroundText
1491+ property color textColor: theme.palette.selected.backgroundText
1492 property real textLeftMargin: units.gu(2)
1493
1494 implicitHeight: headerStyle.contentHeight + separator.height + separatorBottom.height
1495
1496=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/ListItemStyle.qml'
1497--- modules/Ubuntu/Components/Themes/Ambiance/ListItemStyle.qml 2015-03-03 12:53:42 +0000
1498+++ modules/Ubuntu/Components/Themes/Ambiance/ListItemStyle.qml 2015-04-16 13:25:32 +0000
1499@@ -1,5 +1,5 @@
1500 /*
1501- * Copyright 2014-2015 Canonical Ltd.
1502+ * Copyright 2015 Canonical Ltd.
1503 *
1504 * This program is free software; you can redistribute it and/or modify
1505 * it under the terms of the GNU Lesser General Public License as published by
1506@@ -16,7 +16,7 @@
1507
1508 import QtQuick 2.4
1509 import Ubuntu.Components.Styles 1.2 as Styles
1510-import Ubuntu.Components 1.2
1511+import Ubuntu.Components 1.3
1512
1513 Styles.ListItemStyle {
1514
1515@@ -85,7 +85,7 @@
1516
1517 Rectangle {
1518 anchors.fill: parent
1519- color: Theme.palette.selected.background
1520+ color: theme.palette.selected.background
1521 visible: pressed
1522 }
1523
1524
1525=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/OverflowPanel.qml'
1526--- modules/Ubuntu/Components/Themes/Ambiance/OverflowPanel.qml 2015-04-08 16:21:42 +0000
1527+++ modules/Ubuntu/Components/Themes/Ambiance/OverflowPanel.qml 2015-04-16 13:25:32 +0000
1528@@ -33,12 +33,12 @@
1529 /*!
1530 The background color of the tapped item in the panel.
1531 */
1532- property color highlightColor: Theme.palette.selected.background
1533+ property color highlightColor: theme.palette.selected.background
1534
1535 /*!
1536 The foreground color (icon and text) of actions in the panel.
1537 */
1538- property color foregroundColor: Theme.palette.selected.backgroundText
1539+ property color foregroundColor: theme.palette.selected.backgroundText
1540
1541 property bool square: true
1542 callerMargin: -units.gu(1) + units.dp(4)
1543
1544=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/PageHeadButton.qml'
1545--- modules/Ubuntu/Components/Themes/Ambiance/PageHeadButton.qml 2015-03-25 15:54:25 +0000
1546+++ modules/Ubuntu/Components/Themes/Ambiance/PageHeadButton.qml 2015-04-16 13:25:32 +0000
1547@@ -1,5 +1,5 @@
1548 /*
1549- * Copyright 2014 Canonical Ltd.
1550+ * Copyright 2015 Canonical Ltd.
1551 *
1552 * This program is free software; you can redistribute it and/or modify
1553 * it under the terms of the GNU Lesser General Public License as published by
1554@@ -15,7 +15,7 @@
1555 */
1556
1557 import QtQuick 2.4
1558-import Ubuntu.Components 1.2
1559+import Ubuntu.Components 1.3
1560
1561 AbstractButton {
1562 id: button
1563@@ -31,7 +31,7 @@
1564 Rectangle {
1565 visible: button.pressed
1566 anchors.fill: parent
1567- color: Theme.palette.selected.background
1568+ color: theme.palette.selected.background
1569 }
1570
1571 Icon {
1572
1573=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/PageHeadStyle.qml'
1574--- modules/Ubuntu/Components/Themes/Ambiance/PageHeadStyle.qml 2015-04-08 16:21:42 +0000
1575+++ modules/Ubuntu/Components/Themes/Ambiance/PageHeadStyle.qml 2015-04-16 13:25:32 +0000
1576@@ -14,7 +14,7 @@
1577 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1578 */
1579 import QtQuick 2.4
1580-import Ubuntu.Components 1.2
1581+import Ubuntu.Components 1.3
1582 import Ubuntu.Components.Popups 1.0
1583 import Ubuntu.Components.ListItems 1.0 as ListItem
1584 import Ubuntu.Components.Styles 1.2 as Style
1585@@ -41,7 +41,7 @@
1586 /*!
1587 The text color of unselected sections and the section divider.
1588 */
1589- property color sectionColor: Theme.palette.selected.backgroundText
1590+ property color sectionColor: theme.palette.selected.backgroundText
1591
1592 /*!
1593 The text color of the selected section.
1594@@ -51,7 +51,7 @@
1595 /*!
1596 The background color of the pressed section.
1597 */
1598- property color sectionHighlightColor: Theme.palette.selected.background
1599+ property color sectionHighlightColor: theme.palette.selected.background
1600
1601 implicitHeight: headerStyle.contentHeight + divider.height + sectionsItem.height
1602
1603
1604=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/PickerStyle.qml'
1605--- modules/Ubuntu/Components/Themes/Ambiance/PickerStyle.qml 2015-03-03 13:47:48 +0000
1606+++ modules/Ubuntu/Components/Themes/Ambiance/PickerStyle.qml 2015-04-16 13:25:32 +0000
1607@@ -1,5 +1,5 @@
1608 /*
1609- * Copyright 2012 Canonical Ltd.
1610+ * Copyright 2015 Canonical Ltd.
1611 *
1612 * This program is free software; you can redistribute it and/or modify
1613 * it under the terms of the GNU Lesser General Public License as published by
1614@@ -15,7 +15,7 @@
1615 */
1616
1617 import QtQuick 2.4
1618-import Ubuntu.Components 1.2
1619+import Ubuntu.Components 1.3
1620 import Ubuntu.Components.ListItems 1.0
1621
1622 Item {
1623@@ -59,7 +59,7 @@
1624 UbuntuShape {
1625 anchors.fill: parent
1626 radius: "medium"
1627- color: Theme.palette.normal.overlay
1628+ color: theme.palette.normal.overlay
1629 image: shapeSource
1630 }
1631
1632
1633=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml'
1634--- modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml 2015-03-10 12:16:04 +0000
1635+++ modules/Ubuntu/Components/Themes/Ambiance/ProgressBarStyle.qml 2015-04-16 13:25:32 +0000
1636@@ -1,5 +1,5 @@
1637 /*
1638- * Copyright 2013 Canonical Ltd.
1639+ * Copyright 2015 Canonical Ltd.
1640 *
1641 * This program is free software; you can redistribute it and/or modify
1642 * it under the terms of the GNU Lesser General Public License as published by
1643@@ -15,15 +15,15 @@
1644 */
1645
1646 import QtQuick 2.4
1647-import Ubuntu.Components 1.2
1648+import Ubuntu.Components 1.3
1649
1650 Item {
1651 id: progressBarStyle
1652
1653 property color foregroundColor: UbuntuColors.orange
1654 property color foregroundTextColor: '#FFFFFF'
1655- property color backgroundColor: Theme.palette.normal.base
1656- property color backgroundTextColor: Theme.palette.normal.baseText
1657+ property color backgroundColor: theme.palette.normal.base
1658+ property color backgroundTextColor: theme.palette.normal.baseText
1659
1660 property var progressBar: styledItem
1661
1662
1663=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/ScrollbarStyle.qml'
1664--- modules/Ubuntu/Components/Themes/Ambiance/ScrollbarStyle.qml 2015-03-03 13:47:48 +0000
1665+++ modules/Ubuntu/Components/Themes/Ambiance/ScrollbarStyle.qml 2015-04-16 13:25:32 +0000
1666@@ -1,5 +1,5 @@
1667 /*
1668- * Copyright 2012 Canonical Ltd.
1669+ * Copyright 2015 Canonical Ltd.
1670 *
1671 * This program is free software; you can redistribute it and/or modify
1672 * it under the terms of the GNU Lesser General Public License as published by
1673@@ -15,7 +15,7 @@
1674 */
1675
1676 import QtQuick 2.4
1677-import Ubuntu.Components 1.2
1678+import Ubuntu.Components 1.3
1679
1680 /*
1681 The visuals handle both active and passive modes. This behavior is driven yet by
1682@@ -70,7 +70,7 @@
1683 property PropertyAnimation thumbConnectorFading: UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration }
1684 property PropertyAnimation thumbFading: UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration }
1685
1686- property color sliderColor: Theme.palette.normal.base
1687+ property color sliderColor: theme.palette.normal.base
1688 property real sliderRadius: units.gu(0.5)
1689 property color thumbConnectorColor: "white"
1690 property url forwardThumbReleased: (styledItem.align === Qt.AlignLeading || styledItem.align === Qt.AlignTrailing) ? "artwork/ScrollbarBottomIdle.png" : "artwork/ScrollbarRightIdle.png"
1691
1692=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/SliderStyle.qml'
1693--- modules/Ubuntu/Components/Themes/Ambiance/SliderStyle.qml 2015-03-20 01:10:48 +0000
1694+++ modules/Ubuntu/Components/Themes/Ambiance/SliderStyle.qml 2015-04-16 13:25:32 +0000
1695@@ -1,5 +1,5 @@
1696 /*
1697- * Copyright 2013 Canonical Ltd.
1698+ * Copyright 2015 Canonical Ltd.
1699 *
1700 * This program is free software; you can redistribute it and/or modify
1701 * it under the terms of the GNU Lesser General Public License as published by
1702@@ -15,7 +15,7 @@
1703 */
1704
1705 import QtQuick 2.4
1706-import Ubuntu.Components 1.2
1707+import Ubuntu.Components 1.3
1708
1709 /*
1710 The default slider style consists of a bar and a thumb shape.
1711@@ -27,7 +27,7 @@
1712 id: sliderStyle
1713
1714 property color foregroundColor: UbuntuColors.orange
1715- property color backgroundColor: Theme.palette.normal.base
1716+ property color backgroundColor: theme.palette.normal.base
1717
1718 property real thumbSpacing: units.gu(0)
1719 property Item bar: background
1720@@ -81,7 +81,7 @@
1721 width: units.gu(2)
1722 height: units.gu(2)
1723 opacity: 0.97
1724- color: Theme.palette.normal.overlay
1725+ color: theme.palette.normal.overlay
1726 }
1727
1728 BubbleShape {
1729@@ -117,7 +117,7 @@
1730 anchors.centerIn: parent
1731 text: styledItem.formatValue(SliderUtils.liveValue(styledItem))
1732 fontSize: "large"
1733- color: Theme.palette.normal.overlayText
1734+ color: theme.palette.normal.overlayText
1735 }
1736 }
1737 }
1738
1739=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/SwitchStyle.qml'
1740--- modules/Ubuntu/Components/Themes/Ambiance/SwitchStyle.qml 2015-03-03 13:47:48 +0000
1741+++ modules/Ubuntu/Components/Themes/Ambiance/SwitchStyle.qml 2015-04-16 13:25:32 +0000
1742@@ -1,5 +1,5 @@
1743 /*
1744- * Copyright 2013 Canonical Ltd.
1745+ * Copyright 2015 Canonical Ltd.
1746 *
1747 * This program is free software; you can redistribute it and/or modify
1748 * it under the terms of the GNU Lesser General Public License as published by
1749@@ -15,7 +15,7 @@
1750 */
1751
1752 import QtQuick 2.4
1753-import Ubuntu.Components 1.2
1754+import Ubuntu.Components 1.3
1755
1756 Item {
1757 id: switchStyle
1758@@ -39,7 +39,7 @@
1759 /*!
1760 The background color of the switch.
1761 */
1762- property color backgroundColor: Theme.palette.normal.base
1763+ property color backgroundColor: theme.palette.normal.base
1764
1765 /*!
1766 The background color of the thumb when the switch is checked.
1767@@ -54,12 +54,12 @@
1768 /*!
1769 The foreground color of the icon that is currently selected.
1770 */
1771- property color selectedIconColor: Theme.palette.normal.foregroundText
1772+ property color selectedIconColor: theme.palette.normal.foregroundText
1773
1774 /*!
1775 The color of the icon that is not currently selected.
1776 */
1777- property color unselectedIconColor: Theme.palette.normal.backgroundText
1778+ property color unselectedIconColor: theme.palette.normal.backgroundText
1779
1780 /*!
1781 The source of the selected icon when the switch is checked.
1782
1783=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml'
1784--- modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml 2015-03-03 13:47:48 +0000
1785+++ modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml 2015-04-16 13:25:32 +0000
1786@@ -1,5 +1,5 @@
1787 /*
1788- * Copyright 2012 Canonical Ltd.
1789+ * Copyright 2015 Canonical Ltd.
1790 *
1791 * This program is free software; you can redistribute it and/or modify
1792 * it under the terms of the GNU Lesser General Public License as published by
1793@@ -15,7 +15,7 @@
1794 */
1795
1796 import QtQuick 2.4
1797-import Ubuntu.Components 1.2
1798+import Ubuntu.Components 1.3
1799
1800 Item {
1801 id: tabBarStyle
1802@@ -25,8 +25,8 @@
1803 readonly property bool pressed: mouseArea.interacting
1804
1805 // styling properties, public API
1806- property color headerTextColor: Theme.palette.normal.backgroundText
1807- property color headerTextSelectedColor: Theme.palette.selected.backgroundText
1808+ property color headerTextColor: theme.palette.normal.backgroundText
1809+ property color headerTextSelectedColor: theme.palette.selected.backgroundText
1810
1811 // Don't start transitions because of updates to selectionMode before styledItem is completed.
1812 // This fixes bug #1246792: "Disable tabs scrolling animations at startup"
1813@@ -42,7 +42,7 @@
1814
1815 property string headerFontSize: "x-large"
1816 property int headerTextStyle: Text.Normal
1817- property color headerTextStyleColor: Theme.palette.normal.backgroundText
1818+ property color headerTextStyleColor: theme.palette.normal.backgroundText
1819 property int headerFontWeight: Font.Light
1820 property real headerTextLeftMargin: units.gu(2)
1821 property real headerTextRightMargin: units.gu(2)
1822
1823=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/TextAreaStyle.qml'
1824--- modules/Ubuntu/Components/Themes/Ambiance/TextAreaStyle.qml 2015-03-11 15:10:17 +0000
1825+++ modules/Ubuntu/Components/Themes/Ambiance/TextAreaStyle.qml 2015-04-16 13:25:32 +0000
1826@@ -1,5 +1,5 @@
1827 /*
1828- * Copyright 2012 Canonical Ltd.
1829+ * Copyright 2015 Canonical Ltd.
1830 *
1831 * This program is free software; you can redistribute it and/or modify
1832 * it under the terms of the GNU Lesser General Public License as published by
1833@@ -15,7 +15,7 @@
1834 */
1835
1836 import QtQuick 2.4
1837-import Ubuntu.Components 1.2
1838+import Ubuntu.Components 1.3
1839
1840 // frame
1841 // FIXME: stabilize API
1842@@ -25,13 +25,13 @@
1843 // FIXME: needs type checking in themes to define the proper type to be used
1844 // if color type is used, alpha value gets lost
1845
1846- property color color: (styledItem.focus || styledItem.highlighted) ? Theme.palette.selected.fieldText : Theme.palette.normal.fieldText
1847- property color selectedTextColor: Theme.palette.selected.foregroundText
1848- property color selectionColor: Theme.palette.selected.foreground
1849+ property color color: (styledItem.focus || styledItem.highlighted) ? theme.palette.selected.fieldText : theme.palette.normal.fieldText
1850+ property color selectedTextColor: theme.palette.selected.foregroundText
1851+ property color selectionColor: theme.palette.selected.foreground
1852 /*!
1853 Background fill color
1854 */
1855- property color backgroundColor: (styledItem.focus || styledItem.highlighted) ? Theme.palette.selected.field : Theme.palette.normal.field
1856+ property color backgroundColor: (styledItem.focus || styledItem.highlighted) ? theme.palette.selected.field : theme.palette.normal.field
1857 property color errorColor: UbuntuColors.orange
1858
1859 /*!
1860
1861=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/ToolbarStyle.qml'
1862--- modules/Ubuntu/Components/Themes/Ambiance/ToolbarStyle.qml 2015-03-03 13:47:48 +0000
1863+++ modules/Ubuntu/Components/Themes/Ambiance/ToolbarStyle.qml 2015-04-16 13:25:32 +0000
1864@@ -1,5 +1,5 @@
1865 /*
1866- * Copyright 2012 Canonical Ltd.
1867+ * Copyright 2015 Canonical Ltd.
1868 *
1869 * This program is free software; you can redistribute it and/or modify
1870 * it under the terms of the GNU Lesser General Public License as published by
1871@@ -14,12 +14,12 @@
1872 * along with this program. If not, see <http://www.gnu.org/licenses/>.
1873 */
1874 import QtQuick 2.4
1875-import Ubuntu.Components 1.2
1876+import Ubuntu.Components 1.3
1877
1878 Item {
1879 id: visuals
1880 // styling properties
1881- property color color: Theme.palette.normal.overlay
1882+ property color color: theme.palette.normal.overlay
1883
1884 anchors.fill: parent
1885
1886
1887=== modified file 'modules/Ubuntu/Components/Themes/Palette.qml'
1888--- modules/Ubuntu/Components/Themes/Palette.qml 2015-03-03 13:47:48 +0000
1889+++ modules/Ubuntu/Components/Themes/Palette.qml 2015-04-16 13:25:32 +0000
1890@@ -1,5 +1,5 @@
1891 /*
1892- * Copyright 2013 Canonical Ltd.
1893+ * Copyright 2015 Canonical Ltd.
1894 *
1895 * This program is free software; you can redistribute it and/or modify
1896 * it under the terms of the GNU Lesser General Public License as published by
1897@@ -37,11 +37,11 @@
1898 \qml
1899 Item {
1900 Rectangle {
1901- color: Theme.palette.normal.base
1902+ color: theme.palette.normal.base
1903 }
1904
1905 Text {
1906- color: Theme.palette.normal.baseText
1907+ color: theme.palette.normal.baseText
1908 }
1909 }
1910 \endqml
1911
1912=== modified file 'modules/Ubuntu/Components/Toolbar.qml'
1913--- modules/Ubuntu/Components/Toolbar.qml 2015-03-03 13:47:48 +0000
1914+++ modules/Ubuntu/Components/Toolbar.qml 2015-04-16 13:25:32 +0000
1915@@ -1,5 +1,5 @@
1916 /*
1917- * Copyright (C) 2013 Canonical Ltd.
1918+ * Copyright (C) 2015 Canonical Ltd.
1919 *
1920 * This program is free software; you can redistribute it and/or modify
1921 * it under the terms of the GNU Lesser General Public License as published by
1922@@ -134,7 +134,7 @@
1923 property bool opened: toolbar.opened
1924 property bool animating: toolbar.animating
1925
1926- style: Theme.createStyleComponent("ToolbarStyle.qml", background)
1927+ style: theme.createStyleComponent("ToolbarStyle.qml", background)
1928 }
1929
1930 Item {
1931
1932=== modified file 'modules/Ubuntu/Components/ToolbarButton.qml'
1933--- modules/Ubuntu/Components/ToolbarButton.qml 2015-03-03 13:47:48 +0000
1934+++ modules/Ubuntu/Components/ToolbarButton.qml 2015-04-16 13:25:32 +0000
1935@@ -1,5 +1,5 @@
1936 /*
1937- * Copyright (C) 2013 Canonical Ltd.
1938+ * Copyright (C) 2015 Canonical Ltd.
1939 *
1940 * This program is free software; you can redistribute it and/or modify
1941 * it under the terms of the GNU Lesser General Public License as published by
1942@@ -83,5 +83,5 @@
1943 height: parent ? parent.height : undefined
1944 width: units.gu(5)
1945
1946- style: Theme.createStyleComponent("ToolbarButtonStyle.qml", toolbarButton)
1947+ style: theme.createStyleComponent("ToolbarButtonStyle.qml", toolbarButton)
1948 }
1949
1950=== modified file 'modules/Ubuntu/Components/plugin/ucdeprecatedtheme.cpp'
1951--- modules/Ubuntu/Components/plugin/ucdeprecatedtheme.cpp 2015-03-12 20:52:56 +0000
1952+++ modules/Ubuntu/Components/plugin/ucdeprecatedtheme.cpp 2015-04-16 13:25:32 +0000
1953@@ -70,21 +70,32 @@
1954 this, &UCDeprecatedTheme::paletteChanged);
1955 }
1956
1957+void UCDeprecatedTheme::showDeprecatedNote(const char *note)
1958+{
1959+ QByteArray suppressNote = qgetenv("SUPPRESS_DEPRECATED_NOTE");
1960+ if (suppressNote.isEmpty() || suppressNote != "yes") {
1961+ qmlInfo(this) << note;
1962+ }
1963+}
1964+
1965 /*!
1966 \qmlproperty string Theme::name
1967
1968 The name of the current theme.
1969 */
1970-QString UCDeprecatedTheme::name() const
1971+QString UCDeprecatedTheme::name()
1972 {
1973+ showDeprecatedNote("Theme.name is deprecated. Use ThemeSettings instead.");
1974 return UCTheme::defaultTheme().name();
1975 }
1976 void UCDeprecatedTheme::setName(const QString& name)
1977 {
1978+ showDeprecatedNote("Theme.name is deprecated. Use ThemeSettings instead.");
1979 UCTheme::defaultTheme().setName(name);
1980 }
1981 void UCDeprecatedTheme::resetName()
1982 {
1983+ showDeprecatedNote("Theme.name is deprecated. Use ThemeSettings instead.");
1984 UCTheme::defaultTheme().resetName();
1985 }
1986
1987@@ -95,6 +106,7 @@
1988 */
1989 QObject* UCDeprecatedTheme::palette()
1990 {
1991+ showDeprecatedNote("Theme.palette is deprecated. Use ThemeSettings instead.");
1992 return UCTheme::defaultTheme().palette();
1993 }
1994
1995@@ -105,6 +117,7 @@
1996 */
1997 QQmlComponent* UCDeprecatedTheme::createStyleComponent(const QString& styleName, QObject* parent)
1998 {
1999+ showDeprecatedNote("Theme.createStyleComponent() is deprecated. Use ThemeSettings instead.");
2000 return UCTheme::defaultTheme().createStyleComponent(styleName, parent);
2001 }
2002
2003
2004=== modified file 'modules/Ubuntu/Components/plugin/ucdeprecatedtheme.h'
2005--- modules/Ubuntu/Components/plugin/ucdeprecatedtheme.h 2015-03-12 20:11:38 +0000
2006+++ modules/Ubuntu/Components/plugin/ucdeprecatedtheme.h 2015-04-16 13:25:32 +0000
2007@@ -37,7 +37,7 @@
2008 explicit UCDeprecatedTheme(QObject *parent = 0);
2009
2010 // getter/setters
2011- QString name() const;
2012+ QString name();
2013 void setName(const QString& name);
2014 void resetName();
2015 QObject* palette();
2016@@ -48,6 +48,9 @@
2017 Q_SIGNALS:
2018 void nameChanged();
2019 void paletteChanged();
2020+
2021+private:
2022+ void showDeprecatedNote(const char *note);
2023 };
2024
2025 #endif // UCDEPRECATEDTHEME_H
2026
2027=== modified file 'modules/Ubuntu/Components/plugin/uclistitem.cpp'
2028--- modules/Ubuntu/Components/plugin/uclistitem.cpp 2015-03-23 16:23:55 +0000
2029+++ modules/Ubuntu/Components/plugin/uclistitem.cpp 2015-04-16 13:25:32 +0000
2030@@ -15,7 +15,7 @@
2031 */
2032
2033 #include "ucunits.h"
2034-#include "ucdeprecatedtheme.h"
2035+#include "uctheme.h"
2036 #include "uclistitem.h"
2037 #include "uclistitem_p.h"
2038 #include "uclistitemactions.h"
2039@@ -37,20 +37,6 @@
2040 #include <QtQuick/private/qquickbehavior_p.h>
2041 #include <QtQml/QQmlEngine>
2042
2043-QColor getPaletteColor(const char *profile, const char *color)
2044-{
2045- QColor result;
2046- // FIXME: use theme when available
2047- QObject *palette = UCDeprecatedTheme::instance().palette();
2048- if (palette) {
2049- QObject *paletteProfile = palette->property(profile).value<QObject*>();
2050- if (paletteProfile) {
2051- result = paletteProfile->property(color).value<QColor>();
2052- }
2053- }
2054- return result;
2055-}
2056-
2057 /******************************************************************************
2058 * Divider
2059 */
2060@@ -99,13 +85,13 @@
2061
2062 void UCListItemDivider::paletteChanged()
2063 {
2064- QColor background = getPaletteColor("normal", "background");
2065+ Q_D(UCListItemDivider);
2066+ QColor background = d->listItem->getTheme()->getPaletteColor("normal", "background");
2067 if (!background.isValid()) {
2068 return;
2069 }
2070 // FIXME: we need a palette value for divider colors, till then base on the background
2071 // luminance
2072- Q_D(UCListItemDivider);
2073 if (!d->colorFromChanged || !d->colorToChanged) {
2074 qreal luminance = (background.red()*212 + background.green()*715 + background.blue()*73)/1000.0/255.0;
2075 bool lightBackground = (luminance > 0.85);
2076@@ -237,16 +223,21 @@
2077 QObject::connect(contentItem, SIGNAL(xChanged()),
2078 q, SLOT(_q_updateSwiping()), Qt::DirectConnection);
2079
2080- // catch theme changes
2081- // FIXME: use theme when available
2082- QObject::connect(&UCDeprecatedTheme::instance(), SIGNAL(nameChanged()), q, SLOT(_q_updateThemedData()));
2083- _q_updateThemedData();
2084+ // connect theme changes
2085+ QObject::connect(q, SIGNAL(themeChanged()),
2086+ q, SLOT(_q_themeChanged()), Qt::DirectConnection);
2087
2088 // watch grid unit size change and set implicit size
2089 QObject::connect(&UCUnits::instance(), SIGNAL(gridUnitChanged()), q, SLOT(_q_updateSize()));
2090 _q_updateSize();
2091 }
2092
2093+void UCListItemPrivate::_q_themeChanged()
2094+{
2095+ // call the post theme changes
2096+ updateStyling();
2097+}
2098+
2099 // inspired from IS_SIGNAL_CONNECTED(q, UCListItem, pressAndHold, ())
2100 // the macro cannot be used due to Arguments cannot be an empty ()
2101 bool UCListItemPrivate::isClickedConnected()
2102@@ -265,8 +256,9 @@
2103 return QObjectPrivate::get(q)->isSignalConnected(signalIdx);
2104 }
2105
2106-void UCListItemPrivate::_q_updateThemedData()
2107+void UCListItemPrivate::updateStyling()
2108 {
2109+ UCStyledItemBasePrivate::updateStyling();
2110 Q_Q(UCListItem);
2111 // update the divider colors
2112 divider->paletteChanged();
2113@@ -381,8 +373,7 @@
2114 }
2115 delete implicitStyleComponent;
2116 Q_Q(UCListItem);
2117- // FIXME: use theme when available
2118- implicitStyleComponent = UCDeprecatedTheme::instance().createStyleComponent("ListItemStyle.qml", q);
2119+ implicitStyleComponent = getTheme()->createStyleComponent("ListItemStyle.qml", q);
2120 if (implicitStyleComponent) {
2121 // set the objectnane for testing in tst_listitems.qml
2122 implicitStyleComponent->setObjectName("ListItemThemeStyle");
2123@@ -407,7 +398,7 @@
2124 QQmlComponent *delegate = style();
2125 if (!delegate) {
2126 // the style is not loaded from the theme yet
2127- _q_updateThemedData();
2128+ updateStyling();
2129 delegate = style();
2130 }
2131 if (!delegate) {
2132@@ -1010,6 +1001,13 @@
2133 {
2134 }
2135
2136+void UCListItem::classBegin()
2137+{
2138+ UCStyledItemBase::classBegin();
2139+ Q_D(UCListItem);
2140+ d->_q_themeChanged();
2141+}
2142+
2143 void UCListItem::componentComplete()
2144 {
2145 UCStyledItemBase::componentComplete();
2146@@ -1519,7 +1517,7 @@
2147 {
2148 Q_D(UCListItem);
2149 d->customColor = false;
2150- d->highlightColor = getPaletteColor("selected", "background");
2151+ d->highlightColor = d->getTheme()->getPaletteColor("selected", "background");
2152 update();
2153 Q_EMIT highlightColorChanged();
2154 }
2155
2156=== modified file 'modules/Ubuntu/Components/plugin/uclistitem.h'
2157--- modules/Ubuntu/Components/plugin/uclistitem.h 2015-02-24 15:57:53 +0000
2158+++ modules/Ubuntu/Components/plugin/uclistitem.h 2015-04-16 13:25:32 +0000
2159@@ -65,6 +65,7 @@
2160 void resetHighlightColor();
2161
2162 protected:
2163+ void classBegin();
2164 void componentComplete();
2165 QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data);
2166 void itemChange(ItemChange change, const ItemChangeData &data);
2167@@ -102,7 +103,7 @@
2168
2169 private:
2170 Q_DECLARE_PRIVATE(UCListItem)
2171- Q_PRIVATE_SLOT(d_func(), void _q_updateThemedData())
2172+ Q_PRIVATE_SLOT(d_func(), void _q_themeChanged())
2173 Q_PRIVATE_SLOT(d_func(), void _q_relayout())
2174 Q_PRIVATE_SLOT(d_func(), void _q_updateSwiping())
2175 Q_PRIVATE_SLOT(d_func(), void _q_updateSize())
2176
2177=== modified file 'modules/Ubuntu/Components/plugin/uclistitem_p.h'
2178--- modules/Ubuntu/Components/plugin/uclistitem_p.h 2015-02-24 15:57:53 +0000
2179+++ modules/Ubuntu/Components/plugin/uclistitem_p.h 2015-04-16 13:25:32 +0000
2180@@ -48,9 +48,9 @@
2181 return that->d_func();
2182 }
2183
2184+ void _q_themeChanged();
2185 bool isClickedConnected();
2186 bool isPressAndHoldConnected();
2187- void _q_updateThemedData();
2188 void _q_relayout();
2189 void _q_updateSwiping();
2190 void setSwiped(bool swiped);
2191@@ -115,6 +115,9 @@
2192 void setSelectMode(bool selectable);
2193 UCAction *action() const;
2194 void setAction(UCAction *action);
2195+
2196+protected:
2197+ void updateStyling();
2198 };
2199
2200 class PropertyChange;
2201@@ -156,6 +159,4 @@
2202 QPointer<UCListItem> disablerItem;
2203 };
2204
2205-QColor getPaletteColor(const char *profile, const char *color);
2206-
2207 #endif // UCVIEWITEM_P_H
2208
2209=== modified file 'modules/Ubuntu/Components/plugin/ucstyleditembase.cpp'
2210--- modules/Ubuntu/Components/plugin/ucstyleditembase.cpp 2015-04-15 09:53:18 +0000
2211+++ modules/Ubuntu/Components/plugin/ucstyleditembase.cpp 2015-04-16 13:25:32 +0000
2212@@ -22,7 +22,6 @@
2213
2214 UCStyledItemBasePrivate::UCStyledItemBasePrivate()
2215 : activeFocusOnPress(false)
2216- , subthemingEnabled(true)
2217 , theme(0)
2218 , parentStyledItem(0)
2219 {
2220@@ -36,16 +35,8 @@
2221 {
2222 Q_Q(UCStyledItemBase);
2223 q->setFlag(QQuickItem::ItemIsFocusScope);
2224- QByteArray env = qgetenv("UITK_SUBTHEMING");
2225- subthemingEnabled = (env.isEmpty() || env == QByteArrayLiteral("yes"));
2226- if (!subthemingEnabled) {
2227- // every theme will be using the default theme
2228- theme = &UCTheme::defaultTheme();
2229- QObject::connect(theme, &UCTheme::nameChanged, q, &UCStyledItemBase::themeChanged);
2230- } else {
2231- QObject::connect(&UCTheme::defaultTheme(), &UCTheme::nameChanged,
2232- q, &UCStyledItemBase::themeChanged);
2233- }
2234+ QObject::connect(&UCTheme::defaultTheme(), &UCTheme::nameChanged,
2235+ q, &UCStyledItemBase::themeChanged);
2236 }
2237
2238
2239@@ -190,12 +181,10 @@
2240 */
2241 UCTheme *UCStyledItemBasePrivate::getTheme() const
2242 {
2243- if (subthemingEnabled) {
2244- if (theme) {
2245- return theme;
2246- } else if (!parentStyledItem.isNull()) {
2247- return UCStyledItemBasePrivate::get(parentStyledItem)->getTheme();
2248- }
2249+ if (theme) {
2250+ return theme;
2251+ } else if (!parentStyledItem.isNull()) {
2252+ return UCStyledItemBasePrivate::get(parentStyledItem)->getTheme();
2253 }
2254 return &UCTheme::defaultTheme();
2255 }
2256@@ -206,17 +195,6 @@
2257 return;
2258 }
2259
2260- if (!subthemingEnabled) {
2261- // no subtheming
2262- if (newTheme) {
2263- theme = newTheme;
2264- UCTheme::defaultTheme().setName(theme->name());
2265- } else {
2266- UCTheme::defaultTheme().resetName();
2267- }
2268- return;
2269- }
2270-
2271 // disconnect from the previous set
2272 UCTheme *connectedSet = theme ?
2273 theme :
2274@@ -260,6 +238,9 @@
2275 Q_EMIT theme->parentThemeChanged();
2276 }
2277
2278+ // update internal styling
2279+ updateStyling();
2280+
2281 Q_EMIT q->themeChanged();
2282 }
2283 void UCStyledItemBasePrivate::resetTheme()
2284@@ -309,9 +290,6 @@
2285 // disconnect parent stack till item is reached; all the stack if item == 0
2286 void UCStyledItemBasePrivate::disconnectTillItem(QQuickItem *item)
2287 {
2288- if (!subthemingEnabled) {
2289- return;
2290- }
2291 Q_Q(UCStyledItemBase);
2292 while (!parentStack.isEmpty() && item != parentStack.top()) {
2293 QPointer<QQuickItem> stackItem = parentStack.pop();
2294@@ -395,7 +373,7 @@
2295 {
2296 QQuickItem::itemChange(change, data);
2297 Q_D(UCStyledItemBase);
2298- if (change == ItemParentHasChanged && d->subthemingEnabled) {
2299+ if (change == ItemParentHasChanged) {
2300 if (!data.item) {
2301 d->disconnectTillItem(0);
2302 } else if (d->connectParents(0)) {
2303
2304=== modified file 'modules/Ubuntu/Components/plugin/ucstyleditembase.h'
2305--- modules/Ubuntu/Components/plugin/ucstyleditembase.h 2015-04-08 17:03:21 +0000
2306+++ modules/Ubuntu/Components/plugin/ucstyleditembase.h 2015-04-16 13:25:32 +0000
2307@@ -29,7 +29,7 @@
2308 Q_PROPERTY(bool activeFocusOnPress
2309 READ activefocusOnPress WRITE setActiveFocusOnPress
2310 NOTIFY activeFocusOnPressChanged REVISION 1)
2311- Q_PRIVATE_PROPERTY(d_func(), UCTheme *theme READ getTheme WRITE setTheme RESET resetTheme NOTIFY themeChanged REVISION 2)
2312+ Q_PRIVATE_PROPERTY(d_func(), UCTheme *theme READ getTheme WRITE setTheme RESET resetTheme NOTIFY themeChanged FINAL REVISION 2)
2313 public:
2314 explicit UCStyledItemBase(QQuickItem *parent = 0);
2315
2316
2317=== modified file 'modules/Ubuntu/Components/plugin/ucstyleditembase_p.h'
2318--- modules/Ubuntu/Components/plugin/ucstyleditembase_p.h 2015-04-08 17:03:21 +0000
2319+++ modules/Ubuntu/Components/plugin/ucstyleditembase_p.h 2015-04-16 13:25:32 +0000
2320@@ -44,12 +44,14 @@
2321 bool isParentFocusable();
2322
2323 UCTheme *getTheme() const;
2324- void setTheme(UCTheme *styleSet);
2325+ void setTheme(UCTheme *theme);
2326 void resetTheme();
2327
2328+protected:
2329+ virtual void updateStyling() {}
2330+
2331 public:
2332 bool activeFocusOnPress:1;
2333- bool subthemingEnabled:1;
2334 UCTheme *theme;
2335 QPointer<UCStyledItemBase> parentStyledItem;
2336
2337
2338=== modified file 'modules/Ubuntu/Components/plugin/uctheme.cpp'
2339--- modules/Ubuntu/Components/plugin/uctheme.cpp 2015-04-08 17:03:21 +0000
2340+++ modules/Ubuntu/Components/plugin/uctheme.cpp 2015-04-16 13:25:32 +0000
2341@@ -409,3 +409,17 @@
2342 m_palette = defaultTheme().m_palette;
2343 }
2344 }
2345+
2346+// returns the palette color value of a color profile
2347+QColor UCTheme::getPaletteColor(const char *profile, const char *color)
2348+{
2349+ QColor result;
2350+ if (palette()) {
2351+ QObject *paletteProfile = m_palette->property(profile).value<QObject*>();
2352+ if (paletteProfile) {
2353+ result = paletteProfile->property(color).value<QColor>();
2354+ }
2355+ }
2356+ return result;
2357+}
2358+
2359
2360=== modified file 'modules/Ubuntu/Components/plugin/uctheme.h'
2361--- modules/Ubuntu/Components/plugin/uctheme.h 2015-04-08 17:03:21 +0000
2362+++ modules/Ubuntu/Components/plugin/uctheme.h 2015-04-16 13:25:32 +0000
2363@@ -55,6 +55,9 @@
2364 Q_INVOKABLE QQmlComponent* createStyleComponent(const QString& styleName, QObject* parent);
2365 static void registerToContext(QQmlContext* context);
2366
2367+ // helper functions
2368+ QColor getPaletteColor(const char *profile, const char *color);
2369+
2370 Q_SIGNALS:
2371 void parentThemeChanged();
2372 void nameChanged();
2373
2374=== modified file 'tests/unit/tst_performance/tst_performance.cpp'
2375--- tests/unit/tst_performance/tst_performance.cpp 2015-04-08 17:03:21 +0000
2376+++ tests/unit/tst_performance/tst_performance.cpp 2015-04-16 13:25:32 +0000
2377@@ -63,24 +63,27 @@
2378 delete quickView;
2379 }
2380
2381+ void clean()
2382+ {
2383+ qputenv("SUPPRESS_DEPRECATED_NOTE", "no");
2384+ }
2385+
2386 void benchmark_theming_data()
2387 {
2388 QTest::addColumn<QString>("document");
2389 QTest::addColumn<QUrl>("theme");
2390- QTest::addColumn<QByteArray>("enableSubtheming");
2391+ QTest::addColumn<QString>("warning");
2392
2393- QTest::newRow("old theming, subtheming disabled") << "StyledItemOldTheming.qml" << QUrl("Ubuntu.Components.Themes.SuruDark") << QByteArray("no");
2394- QTest::newRow("old theming, subtheming enabled") << "StyledItemOldTheming.qml" << QUrl("Ubuntu.Components.Themes.SuruDark") << QByteArray("yes");
2395- QTest::newRow("subtheming, no changes on themes") << "Styling.qml" << QUrl() << QByteArray("yes");
2396- QTest::newRow("subtheming, change mid item") << "Styling.qml" << QUrl("Ubuntu.Components.Themes.SuruDark") << QByteArray("yes");
2397+ QTest::newRow("old theming, subtheming enabled") << "StyledItemOldTheming.qml" << QUrl("Ubuntu.Components.Themes.SuruDark");
2398+ QTest::newRow("subtheming, no changes on themes") << "Styling.qml" << QUrl();
2399+ QTest::newRow("subtheming, change mid item") << "Styling.qml" << QUrl("Ubuntu.Components.Themes.SuruDark");
2400 }
2401 void benchmark_theming()
2402 {
2403 QFETCH(QString, document);
2404 QFETCH(QUrl, theme);
2405- QFETCH(QByteArray, enableSubtheming);
2406
2407- qputenv("UITK_SUBTHEMING", enableSubtheming);
2408+ qputenv("SUPPRESS_DEPRECATED_NOTE", "yes");
2409 QQuickItem *root = 0;
2410 QBENCHMARK {
2411 root = loadDocument(document);
2412
2413=== modified file 'tests/unit_x11/tst_components/tst_app_theming.qml'
2414--- tests/unit_x11/tst_components/tst_app_theming.qml 2015-03-23 16:23:55 +0000
2415+++ tests/unit_x11/tst_components/tst_app_theming.qml 2015-04-16 13:25:32 +0000
2416@@ -15,7 +15,7 @@
2417 */
2418
2419 import QtQuick 2.4
2420-import Ubuntu.Components 1.2
2421+import Ubuntu.Components 1.3
2422 import QtTest 1.0
2423 import Ubuntu.Test 1.0
2424
2425@@ -24,7 +24,7 @@
2426 width: units.gu(40)
2427 height: units.gu(71)
2428
2429- Component.onCompleted: Theme.name = "AppTheme"
2430+ Component.onCompleted: theme.name = "AppTheme"
2431
2432 Label {
2433 id: testLabel
2434@@ -43,12 +43,12 @@
2435 // and will report failure if received
2436 function test_no_binding_loop_when_set_to_ambiance()
2437 {
2438- Theme.name = "Ubuntu.Components.Themes.Ambiance";
2439+ main.theme.name = "Ubuntu.Components.Themes.Ambiance";
2440 }
2441
2442 function test_reset_theme_should_not_give_binding_loops()
2443 {
2444- Theme.name = undefined;
2445+ main.theme.name = undefined;
2446 }
2447 }
2448 }
2449
2450=== modified file 'tests/unit_x11/tst_components/tst_listitem.qml'
2451--- tests/unit_x11/tst_components/tst_listitem.qml 2015-02-27 08:00:52 +0000
2452+++ tests/unit_x11/tst_components/tst_listitem.qml 2015-04-16 13:25:32 +0000
2453@@ -1,5 +1,5 @@
2454 /*
2455- * Copyright 2014-2015 Canonical Ltd.
2456+ * Copyright 2015 Canonical Ltd.
2457 *
2458 * This program is free software; you can redistribute it and/or modify
2459 * it under the terms of the GNU Lesser General Public License as published by
2460@@ -17,7 +17,7 @@
2461 import QtQuick 2.4
2462 import QtTest 1.0
2463 import Ubuntu.Test 1.0
2464-import Ubuntu.Components 1.2
2465+import Ubuntu.Components 1.3
2466 import Ubuntu.Components.Styles 1.2
2467 import QtQml.Models 2.1
2468
2469@@ -318,7 +318,7 @@
2470 function test_0_defaults() {
2471 verify(defaults.contentItem !== null, "Defaults is null");
2472 compare(defaults.color, "#000000", "Transparent by default");
2473- compare(defaults.highlightColor, Theme.palette.selected.background, "Theme.palette.selected.background color by default")
2474+ compare(defaults.highlightColor, theme.palette.selected.background, "theme.palette.selected.background color by default")
2475 compare(defaults.highlighted, false, "Not highlighted by default");
2476 compare(defaults.divider.visible, true, "divider is visible by default");
2477 compare(defaults.divider.anchors.leftMargin, 0, "divider's left margin is 0");
2478
2479=== modified file 'tests/unit_x11/tst_components/tst_theming.qml'
2480--- tests/unit_x11/tst_components/tst_theming.qml 2015-03-03 13:20:06 +0000
2481+++ tests/unit_x11/tst_components/tst_theming.qml 2015-04-16 13:25:32 +0000
2482@@ -1,5 +1,5 @@
2483 /*
2484- * Copyright 2012 Canonical Ltd.
2485+ * Copyright 2015 Canonical Ltd.
2486 *
2487 * This program is free software; you can redistribute it and/or modify
2488 * it under the terms of the GNU Lesser General Public License as published by
2489@@ -16,7 +16,7 @@
2490
2491 import QtQuick 2.0
2492 import QtTest 1.0
2493-import Ubuntu.Components 1.1
2494+import Ubuntu.Components 1.3
2495 import Ubuntu.Test 1.0
2496
2497 MainView {
2498@@ -24,8 +24,6 @@
2499 width: units.gu(50)
2500 height: units.gu(10)
2501
2502- useDeprecatedToolbar: false
2503-
2504 UbuntuTestCase {
2505 when: windowShown
2506
2507@@ -46,15 +44,15 @@
2508 ];
2509 }
2510 function test_backgroundcolor_change(data) {
2511- if (data.oldTheme !== Theme.name) {
2512- Theme.name = data.oldTheme;
2513+ if (data.oldTheme !== mainView.theme.name) {
2514+ mainView.theme.name = data.oldTheme;
2515 themeSpy.wait();
2516 }
2517 // change color;
2518 themeSpy.clear();
2519 mainView.backgroundColor = data.color;
2520 themeSpy.wait();
2521- compare(Theme.name, data.newTheme, "Theme not chnaged");
2522+ compare(mainView.theme.name, data.newTheme, "Theme not chnaged");
2523 }
2524 }
2525 }
2526
2527=== modified file 'tests/unit_x11/tst_deprecated_theme_engine/tst_deprecated_theme_engine.cpp'
2528--- tests/unit_x11/tst_deprecated_theme_engine/tst_deprecated_theme_engine.cpp 2015-03-23 17:24:32 +0000
2529+++ tests/unit_x11/tst_deprecated_theme_engine/tst_deprecated_theme_engine.cpp 2015-04-16 13:25:32 +0000
2530@@ -89,6 +89,7 @@
2531 void tst_UCDeprecatedTheme::initTestCase()
2532 {
2533 m_xdgDataPath = QLatin1String(getenv("XDG_DATA_DIRS"));
2534+ qputenv("SUPPRESS_DEPRECATED_NOTE", "yes");
2535 }
2536
2537 void tst_UCDeprecatedTheme::cleanupTestCase()
2538
2539=== modified file 'tests/unit_x11/tst_subtheming/tst_subtheming.cpp'
2540--- tests/unit_x11/tst_subtheming/tst_subtheming.cpp 2015-04-10 09:44:56 +0000
2541+++ tests/unit_x11/tst_subtheming/tst_subtheming.cpp 2015-04-16 13:25:32 +0000
2542@@ -94,7 +94,6 @@
2543
2544 void cleanup()
2545 {
2546- qputenv("UITK_SUBTHEMING", "yes");
2547 qputenv("UBUNTU_UI_TOOLKIT_THEMES_PATH", m_themesPath.toLatin1());
2548 qputenv("XDG_DATA_DIRS", m_xdgDataPath.toLocal8Bit());
2549 }
2550@@ -321,17 +320,8 @@
2551
2552
2553 // testing global context property 'theme' name changes
2554- void test_set_global_theme_name_data()
2555- {
2556- QTest::addColumn<QByteArray>("subtheming");
2557-
2558- QTest::newRow("Subtheming disabled") << QByteArray("no");
2559- QTest::newRow("Subtheming enabled") << QByteArray("yes");
2560- }
2561 void test_set_global_theme_name()
2562 {
2563- QFETCH(QByteArray, subtheming);
2564- qputenv("UITK_SUBTHEMING", subtheming);
2565 QScopedPointer<ThemeTestCase> view(new ThemeTestCase("TestMain.qml"));
2566 view->setGlobalTheme("Ubuntu.Components.Themes.SuruDark");
2567 // verify theme changes
2568@@ -347,19 +337,14 @@
2569 // no sub-theming si applied
2570 void test_set_styleditem_theme_name_data()
2571 {
2572- QTest::addColumn<QByteArray>("subtheming");
2573 QTest::addColumn<QString>("itemName");
2574
2575- QTest::newRow("Subtheming disabled, set firstLevelStyled") << QByteArray("no") << "firstLevelStyled";
2576- QTest::newRow("Subtheming disabled, set secondLevelStyled") << QByteArray("no") << "secondLevelStyled";
2577- QTest::newRow("Subtheming enabled, set firstLevelStyled") << QByteArray("yes") << "firstLevelStyled";
2578- QTest::newRow("Subtheming enabled, set secondLevelStyled") << QByteArray("yes") << "secondLevelStyled";
2579+ QTest::newRow("Subtheming enabled, set firstLevelStyled") << "firstLevelStyled";
2580+ QTest::newRow("Subtheming enabled, set secondLevelStyled") << "secondLevelStyled";
2581 }
2582 void test_set_styleditem_theme_name()
2583 {
2584- QFETCH(QByteArray, subtheming);
2585 QFETCH(QString, itemName);
2586- qputenv("UITK_SUBTHEMING", subtheming);
2587 QScopedPointer<ThemeTestCase> view(new ThemeTestCase("TestMain.qml"));
2588 // change theme name (theme)
2589 UCStyledItemBase *styled = view->findItem<UCStyledItemBase*>(itemName);

Subscribers

People subscribed via source and target branches