Merge lp:~zeller-benjamin/ubuntu-ui-toolkit/qrcify3 into lp:ubuntu-ui-toolkit/staging

Proposed by Benjamin Zeller
Status: Work in progress
Proposed branch: lp:~zeller-benjamin/ubuntu-ui-toolkit/qrcify3
Merge into: lp:ubuntu-ui-toolkit/staging
Prerequisite: lp:~zeller-benjamin/ubuntu-ui-toolkit/qrcify2
Diff against target: 968 lines (+498/-240)
22 files modified
src/Ubuntu/Components/Themes/Ambiance/Ambiance.pro (+18/-119)
src/Ubuntu/Components/Themes/Ambiance/ambiance.qrc (+119/-0)
src/Ubuntu/Components/Themes/Ambiance/ambianceplugin.cpp (+7/-0)
src/Ubuntu/Components/Themes/Ambiance/ambianceplugin.h (+15/-0)
src/Ubuntu/Components/Themes/Ambiance/qmldir (+78/-76)
src/Ubuntu/Components/Themes/SuruDark/SuruDark.pro (+21/-15)
src/Ubuntu/Components/Themes/SuruDark/qmldir (+3/-2)
src/Ubuntu/Components/Themes/SuruDark/surudark.qrc (+14/-0)
src/Ubuntu/Components/Themes/SuruDark/surudarkplugin.cpp (+7/-0)
src/Ubuntu/Components/Themes/SuruDark/surudarkplugin.h (+15/-0)
src/Ubuntu/Components/Themes/SuruGradient/SuruGradient.pro (+19/-9)
src/Ubuntu/Components/Themes/SuruGradient/qmldir (+2/-1)
src/Ubuntu/Components/Themes/SuruGradient/surugradient.qrc (+11/-0)
src/Ubuntu/Components/Themes/SuruGradient/surugradientplugin.cpp (+7/-0)
src/Ubuntu/Components/Themes/SuruGradient/surugradientplugin.h (+15/-0)
src/Ubuntu/Components/Themes/ThemesModule.pro (+18/-10)
src/Ubuntu/Components/Themes/qmldir (+6/-4)
src/Ubuntu/Components/Themes/themesmodule.qrc (+8/-0)
src/Ubuntu/Components/Themes/themesplugin.cpp (+7/-0)
src/Ubuntu/Components/Themes/themesplugin.h (+15/-0)
src/Ubuntu/Components/plugin/uctheme.cpp (+89/-2)
src/Ubuntu/Components/plugin/uctheme.h (+4/-2)
To merge this branch: bzr merge lp:~zeller-benjamin/ubuntu-ui-toolkit/qrcify3
Reviewer Review Type Date Requested Status
ubuntu-sdk-build-bot continuous-integration Needs Fixing
PS Jenkins bot continuous-integration Needs Fixing
Zsombor Egri Needs Fixing
Review via email: mp+266552@code.launchpad.net

Commit message

- Add all theme files to qrc
- Adapt theme engine to load the plugins

Description of the change

- Add all theme files to qrc
- Adapt theme engine to load the plugins

To post a comment you must log in.
Revision history for this message
Zsombor Egri (zsombi) wrote :

Theme loading requires few tests to be added. All those @BUG marked points should be defended with tests.

review: Needs Fixing
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
1596. By Benjamin Zeller

Merge with qrcify2

1597. By Benjamin Zeller

Remove remarks

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :

FAILED: Autolanding.
Approved revid is not set in launchpad. This is most likely a launchpad issue and re-approve should fix it. There is also a chance (although a very small one) this is a permission problem of the ps-jenkins bot.
https://jenkins.ubuntu.com/ubuntu-sdk/job/ubuntu-ui-toolkit-autolanding/11/
Executed test runs:
    None: https://jenkins.ubuntu.com/ubuntu-sdk/job/generic-land-mp/11/console

review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) :
review: Approve (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :

FAILED: Autolanding.
Approved revid is not set in launchpad. This is most likely a launchpad issue and re-approve should fix it. There is also a chance (although a very small one) this is a permission problem of the ps-jenkins bot.
https://jenkins.ubuntu.com/ubuntu-sdk/job/ubuntu-ui-toolkit-autolanding/26/
Executed test runs:
    None: https://jenkins.ubuntu.com/ubuntu-sdk/job/generic-land-mp/26/console

review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
ubuntu-sdk-build-bot (ubuntu-sdk-build-bot) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

1597. By Benjamin Zeller

Remove remarks

1596. By Benjamin Zeller

Merge with qrcify2

1595. By Benjamin Zeller

Merge to staging

1594. By Benjamin Zeller

Remove qmlcompiler switch

1593. By Benjamin Zeller

Revert hack for qml compiler

1592. By Benjamin Zeller

Add missing sci files

1591. By Benjamin Zeller

* Workaround for AdaptivePageLayout failing in compiled mode
* Enable qtquickcompiler
* Typo in surugradient

1590. By Benjamin Zeller

Merge staging

1589. By Benjamin Zeller

- Use Item{} to import a plugin, allows much easier to maintain and read
code

1588. By Benjamin Zeller

- Most styles are loading now

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Ubuntu/Components/Themes/Ambiance/Ambiance.pro'
2--- src/Ubuntu/Components/Themes/Ambiance/Ambiance.pro 2015-10-23 05:42:14 +0000
3+++ src/Ubuntu/Components/Themes/Ambiance/Ambiance.pro 2015-10-27 11:23:28 +0000
4@@ -1,121 +1,20 @@
5 TARGETPATH = Ubuntu/Components/Themes/Ambiance
6
7-ARTWORK_FILES += artwork/background_paper@27.png \
8- artwork/bubble_arrow@20.png \
9- artwork/bubble_arrow@30.png \
10- artwork/bubble_arrow@8.png \
11- artwork/bubble_shadow@20.png \
12- artwork/bubble_shadow@20.sci \
13- artwork/bubble_shadow@30.png \
14- artwork/bubble_shadow@30.sci \
15- artwork/bubble_shadow@8.png \
16- artwork/bubble_shadow@8.sci \
17- artwork/caret_noshadow@27.png \
18- artwork/chevron@27.png \
19- artwork/chevron_down@30.png \
20- artwork/cross@30.png \
21- artwork/header_overflow_dropshadow@27.png \
22- artwork/header_overflow_dropshadow@27.sci \
23- artwork/PageHeaderBaseDividerBottom@18.png \
24- artwork/PageHeaderBaseDividerLight@18.png \
25- artwork/PageHeaderBaseDividerLight@18.sci \
26- artwork/progression_divider@18.png \
27- artwork/ScrollbarBottomIdle@8.png \
28- artwork/ScrollbarBottomPressed@8.png \
29- artwork/ScrollbarLeftIdle@8.png \
30- artwork/ScrollbarLeftPressed@8.png \
31- artwork/ScrollbarRightIdle@8.png \
32- artwork/ScrollbarRightPressed@8.png \
33- artwork/ScrollbarTopIdle@8.png \
34- artwork/ScrollbarTopPressed@8.png \
35- artwork/spinner@30.png \
36- artwork/spinner@8.png \
37- artwork/stroke_button@27.png \
38- artwork/tick@30.png \
39- artwork/toolbar_dropshadow@20.png
40-
41-
42-QML_FILES += 1.2/ActivityIndicatorStyle.qml \
43- 1.2/BubbleShape.qml \
44- 1.2/ButtonForeground.qml \
45- 1.2/ButtonStyle.qml \
46- 1.2/CheckBoxStyle.qml \
47- 1.2/ComboButtonStyle.qml \
48- 1.2/DatePickerStyle.qml \
49- 1.2/DialerHandStyle.qml \
50- 1.2/DialerStyle.qml \
51- 1.2/DialogForegroundStyle.qml \
52- 1.2/HeadDividerStyle.qml \
53- 1.2/HeaderStyle.qml \
54- 1.2/HighlightMagnifier.qml \
55- 1.2/ListItemOptionSelectorStyle.qml \
56- 1.2/ListItemStyle.qml \
57- 1.2/MainViewStyle.qml \
58- 1.2/OptionSelectorStyle.qml \
59- 1.2/OverflowPanel.qml \
60- 1.2/PageHeadButton.qml \
61- 1.2/PageHeadStyle.qml \
62- 1.2/Palette.qml \
63- 1.2/PartialColorize.qml \
64- 1.2/PickerDelegateStyle.qml \
65- 1.2/PickerStyle.qml \
66- 1.2/PopoverForegroundStyle.qml \
67- 1.2/ProgressBarStyle.qml \
68- 1.2/ProgressionVisualStyle.qml \
69- 1.2/PullToRefreshStyle.qml \
70- 1.2/ScrollbarStyle.qml \
71- 1.2/SheetForegroundStyle.qml \
72- 1.2/SliderStyle.qml \
73- 1.2/SwitchStyle.qml \
74- 1.2/TabBarStyle.qml \
75- 1.2/TextAreaStyle.qml \
76- 1.2/TextCursorStyle.qml \
77- 1.2/TextFieldStyle.qml \
78- 1.2/ToolbarButtonStyle.qml \
79- 1.2/ToolbarStyle.qml \
80- 1.3/ActionBarStyle.qml \
81- 1.3/ActivityIndicatorStyle.qml \
82- 1.3/BubbleShape.qml \
83- 1.3/ButtonForeground.qml \
84- 1.3/ButtonStyle.qml \
85- 1.3/CheckBoxStyle.qml \
86- 1.3/ComboButtonStyle.qml \
87- 1.3/DatePickerStyle.qml \
88- 1.3/DialerHandStyle.qml \
89- 1.3/DialerStyle.qml \
90- 1.3/DialogForegroundStyle.qml \
91- 1.3/HighlightMagnifier.qml \
92- 1.3/ListItemOptionSelectorStyle.qml \
93- 1.3/ListItemStyle.qml \
94- 1.3/MainViewStyle.qml \
95- 1.3/OptionSelectorStyle.qml \
96- 1.3/OverflowPanel.qml \
97- 1.3/PageHeadButton.qml \
98- 1.3/PageHeadStyle.qml \
99- 1.3/Palette.qml \
100- 1.3/PartialColorize.qml \
101- 1.3/PickerDelegateStyle.qml \
102- 1.3/PickerStyle.qml \
103- 1.3/PopoverForegroundStyle.qml \
104- 1.3/ProgressBarStyle.qml \
105- 1.3/ProgressionVisualStyle.qml \
106- 1.3/PullToRefreshStyle.qml \
107- 1.3/ScrollbarStyle.qml \
108- 1.3/SectionsStyle.qml \
109- 1.3/SheetForegroundStyle.qml \
110- 1.3/SliderStyle.qml \
111- 1.3/SwitchStyle.qml \
112- 1.3/TabBarStyle.qml \
113- 1.3/TextAreaStyle.qml \
114- 1.3/TextCursorStyle.qml \
115- 1.3/TextFieldStyle.qml \
116- 1.3/ToolbarButtonStyle.qml \
117- 1.3/ToolbarStyle.qml \
118- 1.3/IconButtonStyle.qml \
119- 1.3/PageHeaderStyle.qml \
120- 1.3/BottomEdgeHintStyle.qml \
121- $$ARTWORK_FILES
122-
123-load(ubuntu_qml_module)
124-
125-OTHER_FILES+=qmldir
126+CXX_MODULE = qml
127+TARGET = UbuntuAmbianceTheme
128+IMPORT_VERSION = 0.1
129+
130+QT *= qml
131+
132+HEADERS += \
133+ ambianceplugin.h
134+
135+SOURCES += \
136+ ambianceplugin.cpp
137+
138+OTHER_FILES += qmldir
139+
140+RESOURCES += \
141+ ambiance.qrc
142+
143+load(ubuntu_qml_plugin)
144
145=== added file 'src/Ubuntu/Components/Themes/Ambiance/ambiance.qrc'
146--- src/Ubuntu/Components/Themes/Ambiance/ambiance.qrc 1970-01-01 00:00:00 +0000
147+++ src/Ubuntu/Components/Themes/Ambiance/ambiance.qrc 2015-10-27 11:23:28 +0000
148@@ -0,0 +1,119 @@
149+<RCC>
150+ <qresource prefix="/Ubuntu/Components/Themes/Ambiance">
151+ <file>1.2/ActivityIndicatorStyle.qml</file>
152+ <file>1.2/BubbleShape.qml</file>
153+ <file>1.2/ButtonForeground.qml</file>
154+ <file>1.2/ButtonStyle.qml</file>
155+ <file>1.2/CheckBoxStyle.qml</file>
156+ <file>1.2/ComboButtonStyle.qml</file>
157+ <file>1.2/DatePickerStyle.qml</file>
158+ <file>1.2/DialerHandStyle.qml</file>
159+ <file>1.2/DialerStyle.qml</file>
160+ <file>1.2/DialogForegroundStyle.qml</file>
161+ <file>1.2/HeadDividerStyle.qml</file>
162+ <file>1.2/HeaderStyle.qml</file>
163+ <file>1.2/HighlightMagnifier.qml</file>
164+ <file>1.2/ListItemOptionSelectorStyle.qml</file>
165+ <file>1.2/ListItemStyle.qml</file>
166+ <file>1.2/MainViewStyle.qml</file>
167+ <file>1.2/OptionSelectorStyle.qml</file>
168+ <file>1.2/OverflowPanel.qml</file>
169+ <file>1.2/PageHeadButton.qml</file>
170+ <file>1.2/PageHeadStyle.qml</file>
171+ <file>1.2/Palette.qml</file>
172+ <file>1.2/PartialColorize.qml</file>
173+ <file>1.2/PickerDelegateStyle.qml</file>
174+ <file>1.2/PickerStyle.qml</file>
175+ <file>1.2/PopoverForegroundStyle.qml</file>
176+ <file>1.2/ProgressBarStyle.qml</file>
177+ <file>1.2/ProgressionVisualStyle.qml</file>
178+ <file>1.2/PullToRefreshStyle.qml</file>
179+ <file>1.2/ScrollbarStyle.qml</file>
180+ <file>1.2/SheetForegroundStyle.qml</file>
181+ <file>1.2/SliderStyle.qml</file>
182+ <file>1.2/SwitchStyle.qml</file>
183+ <file>1.2/TabBarStyle.qml</file>
184+ <file>1.2/TextAreaStyle.qml</file>
185+ <file>1.2/TextCursorStyle.qml</file>
186+ <file>1.2/TextFieldStyle.qml</file>
187+ <file>1.2/ToolbarButtonStyle.qml</file>
188+ <file>1.2/ToolbarStyle.qml</file>
189+ <file>1.3/ActionBarStyle.qml</file>
190+ <file>1.3/ActivityIndicatorStyle.qml</file>
191+ <file>1.3/BubbleShape.qml</file>
192+ <file>1.3/ButtonForeground.qml</file>
193+ <file>1.3/ButtonStyle.qml</file>
194+ <file>1.3/CheckBoxStyle.qml</file>
195+ <file>1.3/colorUtils.js</file>
196+ <file>1.3/ComboButtonStyle.qml</file>
197+ <file>1.3/DatePickerStyle.qml</file>
198+ <file>1.3/DialerHandStyle.qml</file>
199+ <file>1.3/DialerStyle.qml</file>
200+ <file>1.3/DialogForegroundStyle.qml</file>
201+ <file>1.3/HighlightMagnifier.qml</file>
202+ <file>1.3/IconButtonStyle.qml</file>
203+ <file>1.3/ListItemOptionSelectorStyle.qml</file>
204+ <file>1.3/ListItemStyle.qml</file>
205+ <file>1.3/MainViewStyle.qml</file>
206+ <file>1.3/OptionSelectorStyle.qml</file>
207+ <file>1.3/OverflowPanel.qml</file>
208+ <file>1.3/PageHeadButton.qml</file>
209+ <file>1.3/PageHeadStyle.qml</file>
210+ <file>1.3/Palette.qml</file>
211+ <file>1.3/PartialColorize.qml</file>
212+ <file>1.3/PickerDelegateStyle.qml</file>
213+ <file>1.3/PickerStyle.qml</file>
214+ <file>1.3/PopoverForegroundStyle.qml</file>
215+ <file>1.3/ProgressBarStyle.qml</file>
216+ <file>1.3/ProgressionVisualStyle.qml</file>
217+ <file>1.3/PullToRefreshStyle.qml</file>
218+ <file>1.3/ScrollbarStyle.qml</file>
219+ <file>1.3/scrollbarUtils.js</file>
220+ <file>1.3/SectionsStyle.qml</file>
221+ <file>1.3/SheetForegroundStyle.qml</file>
222+ <file>1.3/SliderStyle.qml</file>
223+ <file>1.3/sliderUtils.js</file>
224+ <file>1.3/SwitchStyle.qml</file>
225+ <file>1.3/TabBarStyle.qml</file>
226+ <file>1.3/TextAreaStyle.qml</file>
227+ <file>1.3/TextCursorStyle.qml</file>
228+ <file>1.3/TextFieldStyle.qml</file>
229+ <file>1.3/ToolbarButtonStyle.qml</file>
230+ <file>1.3/ToolbarStyle.qml</file>
231+ <file>1.3/PageHeaderStyle.qml</file>
232+ <file>1.3/BottomEdgeHintStyle.qml</file>
233+ <file>artwork/background_paper@27.png</file>
234+ <file>artwork/bubble_arrow@20.png</file>
235+ <file>artwork/bubble_arrow@30.png</file>
236+ <file>artwork/bubble_arrow@8.png</file>
237+ <file>artwork/bubble_shadow@20.png</file>
238+ <file>artwork/bubble_shadow@30.png</file>
239+ <file>artwork/bubble_shadow@8.png</file>
240+ <file>artwork/caret_noshadow@27.png</file>
241+ <file>artwork/chevron@27.png</file>
242+ <file>artwork/chevron_down@30.png</file>
243+ <file>artwork/cross@30.png</file>
244+ <file>artwork/header_overflow_dropshadow@27.png</file>
245+ <file>artwork/PageHeaderBaseDividerBottom@18.png</file>
246+ <file>artwork/PageHeaderBaseDividerLight@18.png</file>
247+ <file>artwork/progression_divider@18.png</file>
248+ <file>artwork/ScrollbarBottomIdle@8.png</file>
249+ <file>artwork/ScrollbarBottomPressed@8.png</file>
250+ <file>artwork/ScrollbarLeftIdle@8.png</file>
251+ <file>artwork/ScrollbarLeftPressed@8.png</file>
252+ <file>artwork/ScrollbarRightIdle@8.png</file>
253+ <file>artwork/ScrollbarRightPressed@8.png</file>
254+ <file>artwork/ScrollbarTopIdle@8.png</file>
255+ <file>artwork/ScrollbarTopPressed@8.png</file>
256+ <file>artwork/spinner@30.png</file>
257+ <file>artwork/spinner@8.png</file>
258+ <file>artwork/stroke_button@27.png</file>
259+ <file>artwork/tick@30.png</file>
260+ <file>artwork/toolbar_dropshadow@20.png</file>
261+ <file>artwork/bubble_shadow@8.sci</file>
262+ <file>artwork/bubble_shadow@20.sci</file>
263+ <file>artwork/bubble_shadow@30.sci</file>
264+ <file>artwork/PageHeaderBaseDividerLight@18.sci</file>
265+ <file>artwork/header_overflow_dropshadow@27.sci</file>
266+ </qresource>
267+</RCC>
268
269=== added file 'src/Ubuntu/Components/Themes/Ambiance/ambianceplugin.cpp'
270--- src/Ubuntu/Components/Themes/Ambiance/ambianceplugin.cpp 1970-01-01 00:00:00 +0000
271+++ src/Ubuntu/Components/Themes/Ambiance/ambianceplugin.cpp 2015-10-27 11:23:28 +0000
272@@ -0,0 +1,7 @@
273+#include "ambianceplugin.h"
274+
275+void AmbiancePlugin::registerTypes(const char *uri)
276+{
277+ Q_UNUSED(uri);
278+ //do nothing, the plugin is just here to carry the qrc file
279+}
280
281=== added file 'src/Ubuntu/Components/Themes/Ambiance/ambianceplugin.h'
282--- src/Ubuntu/Components/Themes/Ambiance/ambianceplugin.h 1970-01-01 00:00:00 +0000
283+++ src/Ubuntu/Components/Themes/Ambiance/ambianceplugin.h 2015-10-27 11:23:28 +0000
284@@ -0,0 +1,15 @@
285+#ifndef AMBIANCEPLUGIN_H
286+#define AMBIANCEPLUGIN_H
287+
288+#include <QQmlExtensionPlugin>
289+
290+class AmbiancePlugin : public QQmlExtensionPlugin
291+{
292+ Q_OBJECT
293+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
294+
295+public:
296+ void registerTypes(const char *uri);
297+};
298+
299+#endif // AMBIANCEPLUGIN_H
300
301=== modified file 'src/Ubuntu/Components/Themes/Ambiance/qmldir'
302--- src/Ubuntu/Components/Themes/Ambiance/qmldir 2015-10-02 22:48:13 +0000
303+++ src/Ubuntu/Components/Themes/Ambiance/qmldir 2015-10-27 11:23:28 +0000
304@@ -1,87 +1,89 @@
305 module Ubuntu.Components.Themes.Ambiance
306-internal ActivityIndicatorStyle ./1.2/ActivityIndicatorStyle.qml
307-internal ButtonStyle ./1.2/ButtonStyle.qml
308-internal DialogForegroundStyle ./1.2/DialogForegroundStyle.qml
309-internal HeaderStyle ./1.2/HeaderStyle.qml
310-internal PageHeadButton ./1.2/PageHeadButton.qml
311-MainViewStyle 0.1 ./1.2/MainViewStyle.qml
312-ListItemOptionSelector 0.1 ./1.2/ListItemOptionSelector.qml
313-OptionSelectorStyle 0.1 ./1.2/OptionSelectorStyle.qml
314-PopoverForegroundStyle 0.1 ./1.2/PopoverForegroundStyle.qml
315-internal ScrollbarStyle ./1.2/ScrollbarStyle.qml
316-internal SheetForegroundStyle ./1.2/SheetForegroundStyle.qml
317-internal SliderStyle ./1.2/SliderStyle.qml
318-TabBarStyle 0.1 ./1.2/TabBarStyle.qml
319-TextAreaStyle 0.1 ./1.2/TextAreaStyle.qml
320-internal TextCursorStyle ./1.2/TextCursorStyle.qml
321-TextFieldStyle 0.1 ./1.2/TextFieldStyle.qml
322-internal ToolbarButtonStyle ./1.2/ToolbarButtonStyle.qml
323-internal ToolbarStyle ./1.2/ToolbarStyle.qml
324-internal BubbleShape ./1.2/BubbleShape.qml
325-PickerStyle 0.1 ./1.2/PickerStyle.qml
326-DatePickerStyle 0.1 ./1.2/DatePickerStyle.qml
327-PickerDelegateStyle 0.1 ./1.2/PickerDelegateStyle.qml
328-DialerStyle 0.1 ./1.2/DialerStyle.qml
329-DialerHandStyle 0.1 ./1.2/DialerHandStyle.qml
330-internal HighlightMagnifier ./1.2/HighlightMagnifier.qml
331+plugin UbuntuAmbianceTheme
332+
333+internal ActivityIndicatorStyle qrc:/Ubuntu/Components/Themes/Ambiance/1.2/ActivityIndicatorStyle.qml
334+internal ButtonStyle qrc:/Ubuntu/Components/Themes/Ambiance/1.2/ButtonStyle.qml
335+internal DialogForegroundStyle qrc:/Ubuntu/Components/Themes/Ambiance/1.2/DialogForegroundStyle.qml
336+internal HeaderStyle qrc:/Ubuntu/Components/Themes/Ambiance/1.2/HeaderStyle.qml
337+internal PageHeadButton qrc:/Ubuntu/Components/Themes/Ambiance/1.2/PageHeadButton.qml
338+MainViewStyle 0.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/MainViewStyle.qml
339+ListItemOptionSelector 0.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/ListItemOptionSelector.qml
340+OptionSelectorStyle 0.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/OptionSelectorStyle.qml
341+PopoverForegroundStyle 0.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/PopoverForegroundStyle.qml
342+internal ScrollbarStyle qrc:/Ubuntu/Components/Themes/Ambiance/1.2/ScrollbarStyle.qml
343+internal SheetForegroundStyle qrc:/Ubuntu/Components/Themes/Ambiance/1.2/SheetForegroundStyle.qml
344+internal SliderStyle qrc:/Ubuntu/Components/Themes/Ambiance/1.2/SliderStyle.qml
345+TabBarStyle 0.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/TabBarStyle.qml
346+TextAreaStyle 0.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/TextAreaStyle.qml
347+internal TextCursorStyle qrc:/Ubuntu/Components/Themes/Ambiance/1.2/TextCursorStyle.qml
348+TextFieldStyle 0.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/TextFieldStyle.qml
349+internal ToolbarButtonStyle qrc:/Ubuntu/Components/Themes/Ambiance/1.2/ToolbarButtonStyle.qml
350+internal ToolbarStyle qrc:/Ubuntu/Components/Themes/Ambiance/1.2/ToolbarStyle.qml
351+internal BubbleShape qrc:/Ubuntu/Components/Themes/Ambiance/1.2/BubbleShape.qml
352+PickerStyle 0.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/PickerStyle.qml
353+DatePickerStyle 0.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/DatePickerStyle.qml
354+PickerDelegateStyle 0.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/PickerDelegateStyle.qml
355+DialerStyle 0.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/DialerStyle.qml
356+DialerHandStyle 0.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/DialerHandStyle.qml
357+internal HighlightMagnifier qrc:/Ubuntu/Components/Themes/Ambiance/1.2/HighlightMagnifier.qml
358
359 #version 1.0
360-MainViewStyle 1.0 ./1.2/MainViewStyle.qml
361-ListItemOptionSelector 1.0 ./1.2/ListItemOptionSelector.qml
362-OptionSelectorStyle 1.0 ./1.2/OptionSelectorStyle.qml
363-PopoverForegroundStyle 1.0 ./1.2/PopoverForegroundStyle.qml
364-TabBarStyle 1.0 ./1.2/TabBarStyle.qml
365-TextAreaStyle 1.0 ./1.2/TextAreaStyle.qml
366-TextFieldStyle 1.0 ./1.2/TextFieldStyle.qml
367-PickerStyle 1.0 ./1.2/PickerStyle.qml
368-DatePickerStyle 1.0 ./1.2/DatePickerStyle.qml
369-PickerDelegateStyle 1.0 ./1.2/PickerDelegateStyle.qml
370-DialerStyle 1.0 ./1.2/DialerStyle.qml
371-DialerHandStyle 1.0 ./1.2/DialerHandStyle.qml
372+MainViewStyle 1.0 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/MainViewStyle.qml
373+ListItemOptionSelector 1.0 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/ListItemOptionSelector.qml
374+OptionSelectorStyle 1.0 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/OptionSelectorStyle.qml
375+PopoverForegroundStyle 1.0 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/PopoverForegroundStyle.qml
376+TabBarStyle 1.0 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/TabBarStyle.qml
377+TextAreaStyle 1.0 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/TextAreaStyle.qml
378+TextFieldStyle 1.0 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/TextFieldStyle.qml
379+PickerStyle 1.0 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/PickerStyle.qml
380+DatePickerStyle 1.0 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/DatePickerStyle.qml
381+PickerDelegateStyle 1.0 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/PickerDelegateStyle.qml
382+DialerStyle 1.0 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/DialerStyle.qml
383+DialerHandStyle 1.0 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/DialerHandStyle.qml
384
385 #version 1.1
386-ComboButtonStyle 1.1 ./1.2/ComboButtonStyle.qml
387-PullToRefreshStyle 1.1 ./1.2/PullToRefreshStyle.qml
388-PageHeadStyle 1.1 ./1.2/PageHeadStyle.qml
389-Palette 1.1 ./1.2/Palette.qml
390-ButtonStyle 1.1 ./1.2/ButtonStyle.qml
391-SliderStyle 1.1 ./1.2/SliderStyle.qml
392-SwitchStyle 1.1 ./1.2/SwitchStyle.qml
393-CheckBoxStyle 1.1 ./1.2/CheckBoxStyle.qml
394+ComboButtonStyle 1.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/ComboButtonStyle.qml
395+PullToRefreshStyle 1.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/PullToRefreshStyle.qml
396+PageHeadStyle 1.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/PageHeadStyle.qml
397+Palette 1.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/Palette.qml
398+ButtonStyle 1.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/ButtonStyle.qml
399+SliderStyle 1.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/SliderStyle.qml
400+SwitchStyle 1.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/SwitchStyle.qml
401+CheckBoxStyle 1.1 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/CheckBoxStyle.qml
402
403-internal OverflowPanel ./1.2/OverflowPanel.qml
404-internal HeadDividerStyle ./1.2/HeadDividerStyle.qml
405+internal OverflowPanel qrc:/Ubuntu/Components/Themes/Ambiance/1.2/OverflowPanel.qml
406+internal HeadDividerStyle qrc:/Ubuntu/Components/Themes/Ambiance/1.2/HeadDividerStyle.qml
407
408 #version 1.2
409-ListItemStyle 1.2 ./1.2/ListItemStyle.qml
410+ListItemStyle 1.2 qrc:/Ubuntu/Components/Themes/Ambiance/1.2/ListItemStyle.qml
411
412 #################################################
413 #version 1.3
414-ActionBarStyle 1.3 ./1.3/ActionBarStyle.qml
415-MainViewStyle 1.3 ./1.3/MainViewStyle.qml
416-ListItemOptionSelector 1.3 ./1.3/ListItemOptionSelector.qml
417-OptionSelectorStyle 1.3 ./1.3/OptionSelectorStyle.qml
418-PopoverForegroundStyle 1.3 ./1.3/PopoverForegroundStyle.qml
419-TabBarStyle 1.3 ./1.3/TabBarStyle.qml
420-TextAreaStyle 1.3 ./1.3/TextAreaStyle.qml
421-TextFieldStyle 1.3 ./1.3/TextFieldStyle.qml
422-PickerStyle 1.3 ./1.3/PickerStyle.qml
423-DatePickerStyle 1.3 ./1.3/DatePickerStyle.qml
424-PickerDelegateStyle 1.3 ./1.3/PickerDelegateStyle.qml
425-DialerStyle 1.3 ./1.3/DialerStyle.qml
426-DialerHandStyle 1.3 ./1.3/DialerHandStyle.qml
427-
428-ComboButtonStyle 1.3 ./1.3/ComboButtonStyle.qml
429-PullToRefreshStyle 1.3 ./1.3/PullToRefreshStyle.qml
430-PageHeadStyle 1.3 ./1.3/PageHeadStyle.qml
431-Palette 1.3 ./1.3/Palette.qml
432-ButtonStyle 1.3 ./1.3/ButtonStyle.qml
433-SliderStyle 1.3 ./1.3/SliderStyle.qml
434-SwitchStyle 1.3 ./1.3/SwitchStyle.qml
435-CheckBoxStyle 1.3 ./1.3/CheckBoxStyle.qml
436-
437-ListItemStyle 1.3 ./1.3/ListItemStyle.qml
438-internal SliderUtils 1.3/sliderUtils.js
439-internal ScrollbarUtils 1.3/scrollbarUtils.js
440-internal ColorUtils 1.3/colorUtils.js
441-PageHeaderStyle 1.3 ./1.3/PageHeaderStyle.qml
442+ActionBarStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/ActionBarStyle.qml
443+MainViewStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/MainViewStyle.qml
444+ListItemOptionSelector 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/ListItemOptionSelector.qml
445+OptionSelectorStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/OptionSelectorStyle.qml
446+PopoverForegroundStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/PopoverForegroundStyle.qml
447+TabBarStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/TabBarStyle.qml
448+TextAreaStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/TextAreaStyle.qml
449+TextFieldStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/TextFieldStyle.qml
450+PickerStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/PickerStyle.qml
451+DatePickerStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/DatePickerStyle.qml
452+PickerDelegateStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/PickerDelegateStyle.qml
453+DialerStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/DialerStyle.qml
454+DialerHandStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/DialerHandStyle.qml
455+
456+ComboButtonStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/ComboButtonStyle.qml
457+PullToRefreshStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/PullToRefreshStyle.qml
458+PageHeadStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/PageHeadStyle.qml
459+Palette 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/Palette.qml
460+ButtonStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/ButtonStyle.qml
461+SliderStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/SliderStyle.qml
462+SwitchStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/SwitchStyle.qml
463+CheckBoxStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/CheckBoxStyle.qml
464+
465+ListItemStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/ListItemStyle.qml
466+internal SliderUtils qrc:/Ubuntu/Components/Themes/Ambiance/1.3/sliderUtils.js
467+internal ScrollbarUtils qrc:/Ubuntu/Components/Themes/Ambiance/1.3/scrollbarUtils.js
468+internal ColorUtils qrc:/Ubuntu/Components/Themes/Ambiance/1.3/colorUtils.js
469+PageHeaderStyle 1.3 qrc:/Ubuntu/Components/Themes/Ambiance/1.3/PageHeaderStyle.qml
470
471=== modified file 'src/Ubuntu/Components/Themes/SuruDark/SuruDark.pro'
472--- src/Ubuntu/Components/Themes/SuruDark/SuruDark.pro 2015-08-06 22:47:38 +0000
473+++ src/Ubuntu/Components/Themes/SuruDark/SuruDark.pro 2015-10-27 11:23:28 +0000
474@@ -1,18 +1,24 @@
475 TARGETPATH = Ubuntu/Components/Themes/SuruDark
476
477+CXX_MODULE = qml
478+TARGET = UbuntuSuruDarkTheme
479+IMPORT_VERSION = 0.1
480+
481+QT *= qml
482+
483 PARENT_THEME_FILE = parent_theme
484-ARTWORK_FILES += artwork/chevron@27.png
485-
486-QML_FILES += 1.2/MainViewStyle.qml \
487- 1.2/OptionSelectorStyle.qml \
488- 1.2/Palette.qml \
489- 1.2/TabBarStyle.qml \
490- 1.2/ListItemStyle.qml \
491- 1.3/OptionSelectorStyle.qml \
492- 1.3/Palette.qml \
493- 1.3/TabBarStyle.qml \
494- 1.3/ListItemStyle.qml \
495- $$ARTWORK_FILES \
496- $$PARENT_THEME_FILE
497-
498-load(ubuntu_qml_module)
499+QML_FILES += $$PARENT_THEME_FILE
500+
501+HEADERS += \
502+ surudarkplugin.h
503+
504+SOURCES += \
505+ surudarkplugin.cpp
506+
507+RESOURCES += \
508+ surudark.qrc
509+
510+OTHER_FILES += qmldir
511+
512+load(ubuntu_qml_plugin)
513+
514
515=== modified file 'src/Ubuntu/Components/Themes/SuruDark/qmldir'
516--- src/Ubuntu/Components/Themes/SuruDark/qmldir 2015-04-24 14:48:00 +0000
517+++ src/Ubuntu/Components/Themes/SuruDark/qmldir 2015-10-27 11:23:28 +0000
518@@ -1,7 +1,8 @@
519 module Ubuntu.Components.Themes.SuruDark
520+plugin UbuntuSuruDarkTheme
521
522 #version 1.1
523-Palette 1.1 ./1.2/Palette.qml
524+Palette 1.1 qrc:/Ubuntu/Components/Themes/SuruDark/1.2/Palette.qml
525
526 #version 1.3
527-Palette 1.3 ./1.3/Palette.qml
528+Palette 1.3 qrc:/Ubuntu/Components/Themes/SuruDark/1.3/Palette.qml
529
530=== added file 'src/Ubuntu/Components/Themes/SuruDark/surudark.qrc'
531--- src/Ubuntu/Components/Themes/SuruDark/surudark.qrc 1970-01-01 00:00:00 +0000
532+++ src/Ubuntu/Components/Themes/SuruDark/surudark.qrc 2015-10-27 11:23:28 +0000
533@@ -0,0 +1,14 @@
534+<RCC>
535+ <qresource prefix="/Ubuntu/Components/Themes/SuruDark">
536+ <file>1.2/ListItemStyle.qml</file>
537+ <file>1.2/MainViewStyle.qml</file>
538+ <file>1.2/OptionSelectorStyle.qml</file>
539+ <file>1.2/Palette.qml</file>
540+ <file>1.2/TabBarStyle.qml</file>
541+ <file>1.3/ListItemStyle.qml</file>
542+ <file>1.3/OptionSelectorStyle.qml</file>
543+ <file>1.3/Palette.qml</file>
544+ <file>1.3/TabBarStyle.qml</file>
545+ <file>artwork/chevron@27.png</file>
546+ </qresource>
547+</RCC>
548
549=== added file 'src/Ubuntu/Components/Themes/SuruDark/surudarkplugin.cpp'
550--- src/Ubuntu/Components/Themes/SuruDark/surudarkplugin.cpp 1970-01-01 00:00:00 +0000
551+++ src/Ubuntu/Components/Themes/SuruDark/surudarkplugin.cpp 2015-10-27 11:23:28 +0000
552@@ -0,0 +1,7 @@
553+#include "surudarkplugin.h"
554+
555+void SuruDarkPlugin::registerTypes(const char *uri)
556+{
557+ Q_UNUSED(uri);
558+ //do nothing, the plugin is just here to carry the qrc file
559+}
560
561=== added file 'src/Ubuntu/Components/Themes/SuruDark/surudarkplugin.h'
562--- src/Ubuntu/Components/Themes/SuruDark/surudarkplugin.h 1970-01-01 00:00:00 +0000
563+++ src/Ubuntu/Components/Themes/SuruDark/surudarkplugin.h 2015-10-27 11:23:28 +0000
564@@ -0,0 +1,15 @@
565+#ifndef SURUDARKPLUGIN_H
566+#define SURUDARKPLUGIN_H
567+
568+#include <QQmlExtensionPlugin>
569+
570+class SuruDarkPlugin: public QQmlExtensionPlugin
571+{
572+ Q_OBJECT
573+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
574+
575+public:
576+ void registerTypes(const char *uri);
577+};
578+
579+#endif // SURUDARKPLUGIN_H
580
581=== modified file 'src/Ubuntu/Components/Themes/SuruGradient/SuruGradient.pro'
582--- src/Ubuntu/Components/Themes/SuruGradient/SuruGradient.pro 2015-05-19 09:23:01 +0000
583+++ src/Ubuntu/Components/Themes/SuruGradient/SuruGradient.pro 2015-10-27 11:23:28 +0000
584@@ -1,17 +1,27 @@
585 TARGETPATH = Ubuntu/Components/Themes/SuruGradient
586
587+CXX_MODULE = qml
588+TARGET = UbuntuSuruGradientTheme
589+IMPORT_VERSION = 0.1
590+
591+QT *= qml
592+
593 PARENT_THEME_FILE = parent_theme
594 DEPRECATED_FILE = deprecated
595-ARTWORK_FILES += artwork/chevron@27.png \
596- artwork/chevron_down@30.png \
597- artwork/tick@30.png \
598
599-QML_FILES += MainViewStyle.qml \
600- OptionSelectorStyle.qml \
601- Palette.qml \
602- TabBarStyle.qml \
603- $$ARTWORK_FILES \
604+QML_FILES += \
605 $$PARENT_THEME_FILE \
606 $$DEPRECATED_FILE
607
608-load(ubuntu_qml_module)
609+HEADERS += \
610+ surugradientplugin.h
611+
612+SOURCES += \
613+ surugradientplugin.cpp
614+
615+RESOURCES += \
616+ surugradient.qrc
617+
618+OTHER_FILES += qmldir
619+
620+load(ubuntu_qml_plugin)
621
622=== modified file 'src/Ubuntu/Components/Themes/SuruGradient/qmldir'
623--- src/Ubuntu/Components/Themes/SuruGradient/qmldir 2014-08-07 19:24:52 +0000
624+++ src/Ubuntu/Components/Themes/SuruGradient/qmldir 2015-10-27 11:23:28 +0000
625@@ -1,4 +1,5 @@
626 module Ubuntu.Components.Themes.SuruGradient
627+plugin UbuntuSuruGradientTheme
628
629 #version 1.1
630-Palette 1.1 Palette.qml
631+Palette 1.1 qrc:/Ubuntu/Components/Themes/SuruGradient/Palette.qml
632
633=== added file 'src/Ubuntu/Components/Themes/SuruGradient/surugradient.qrc'
634--- src/Ubuntu/Components/Themes/SuruGradient/surugradient.qrc 1970-01-01 00:00:00 +0000
635+++ src/Ubuntu/Components/Themes/SuruGradient/surugradient.qrc 2015-10-27 11:23:28 +0000
636@@ -0,0 +1,11 @@
637+<RCC>
638+ <qresource prefix="/Ubuntu/Components/Themes/SuruGradient">
639+ <file>artwork/chevron@27.png</file>
640+ <file>artwork/chevron_down@30.png</file>
641+ <file>artwork/tick@30.png</file>
642+ <file>MainViewStyle.qml</file>
643+ <file>OptionSelectorStyle.qml</file>
644+ <file>Palette.qml</file>
645+ <file>TabBarStyle.qml</file>
646+ </qresource>
647+</RCC>
648
649=== added file 'src/Ubuntu/Components/Themes/SuruGradient/surugradientplugin.cpp'
650--- src/Ubuntu/Components/Themes/SuruGradient/surugradientplugin.cpp 1970-01-01 00:00:00 +0000
651+++ src/Ubuntu/Components/Themes/SuruGradient/surugradientplugin.cpp 2015-10-27 11:23:28 +0000
652@@ -0,0 +1,7 @@
653+#include "surugradientplugin.h"
654+
655+void SuruGradientPlugin::registerTypes(const char *uri)
656+{
657+ Q_UNUSED(uri);
658+ //do nothing, the plugin is just here to carry the qrc file
659+}
660
661=== added file 'src/Ubuntu/Components/Themes/SuruGradient/surugradientplugin.h'
662--- src/Ubuntu/Components/Themes/SuruGradient/surugradientplugin.h 1970-01-01 00:00:00 +0000
663+++ src/Ubuntu/Components/Themes/SuruGradient/surugradientplugin.h 2015-10-27 11:23:28 +0000
664@@ -0,0 +1,15 @@
665+#ifndef SURUGRADIENTPLUGIN_H
666+#define SURUGRADIENTPLUGIN_H
667+
668+#include <QQmlExtensionPlugin>
669+
670+class SuruGradientPlugin: public QQmlExtensionPlugin
671+{
672+ Q_OBJECT
673+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
674+
675+public:
676+ void registerTypes(const char *uri);
677+};
678+
679+#endif // SURUGRADIENTPLUGIN_H
680
681=== modified file 'src/Ubuntu/Components/Themes/ThemesModule.pro'
682--- src/Ubuntu/Components/Themes/ThemesModule.pro 2015-05-19 09:23:01 +0000
683+++ src/Ubuntu/Components/Themes/ThemesModule.pro 2015-10-27 11:23:28 +0000
684@@ -1,12 +1,20 @@
685 TARGETPATH = Ubuntu/Components/Themes
686
687-
688-ARTWORK_FILES = $$system(find artwork -type f)
689-
690-QML_FILES += 1.2/Palette.qml \
691- 1.2/PaletteValues.qml \
692- 1.3/Palette.qml \
693- 1.3/PaletteValues.qml \
694- $$ARTWORK_FILES
695-
696-load(ubuntu_qml_module)
697+CXX_MODULE = qml
698+TARGET = UbuntuThemesModule
699+IMPORT_VERSION = 0.1
700+
701+QT *= qml
702+
703+HEADERS += \
704+ themesplugin.h
705+
706+SOURCES += \
707+ themesplugin.cpp
708+
709+RESOURCES += \
710+ themesmodule.qrc
711+
712+OTHER_FILES += qmldir
713+
714+load(ubuntu_qml_plugin)
715
716=== modified file 'src/Ubuntu/Components/Themes/qmldir'
717--- src/Ubuntu/Components/Themes/qmldir 2015-05-26 07:38:55 +0000
718+++ src/Ubuntu/Components/Themes/qmldir 2015-10-27 11:23:28 +0000
719@@ -1,7 +1,9 @@
720 module Ubuntu.Components.Themes
721-Palette 0.1 ./1.2/Palette.qml
722-PaletteValues 0.1 ./1.2/PaletteValues.qml
723+plugin UbuntuThemesModule
724+
725+Palette 0.1 qrc:/Ubuntu/Components/Themes/1.2/Palette.qml
726+PaletteValues 0.1 qrc:/Ubuntu/Components/Themes/1.2/PaletteValues.qml
727
728 #version 1.3
729-Palette 1.3 ./1.3/Palette.qml
730-PaletteValues 1.3 ./1.3/PaletteValues.qml
731+Palette 1.3 qrc:/Ubuntu/Components/Themes/1.3/Palette.qml
732+PaletteValues 1.3 qrc:/Ubuntu/Components/Themes/1.3/PaletteValues.qml
733
734=== added file 'src/Ubuntu/Components/Themes/themesmodule.qrc'
735--- src/Ubuntu/Components/Themes/themesmodule.qrc 1970-01-01 00:00:00 +0000
736+++ src/Ubuntu/Components/Themes/themesmodule.qrc 2015-10-27 11:23:28 +0000
737@@ -0,0 +1,8 @@
738+<RCC>
739+ <qresource prefix="/Ubuntu/Components/Themes">
740+ <file>1.2/Palette.qml</file>
741+ <file>1.2/PaletteValues.qml</file>
742+ <file>1.3/Palette.qml</file>
743+ <file>1.3/PaletteValues.qml</file>
744+ </qresource>
745+</RCC>
746
747=== added file 'src/Ubuntu/Components/Themes/themesplugin.cpp'
748--- src/Ubuntu/Components/Themes/themesplugin.cpp 1970-01-01 00:00:00 +0000
749+++ src/Ubuntu/Components/Themes/themesplugin.cpp 2015-10-27 11:23:28 +0000
750@@ -0,0 +1,7 @@
751+#include "themesplugin.h"
752+
753+void ThemesPlugin::registerTypes(const char *uri)
754+{
755+ Q_UNUSED(uri);
756+ //do nothing, the plugin is just here to carry the qrc file
757+}
758
759=== added file 'src/Ubuntu/Components/Themes/themesplugin.h'
760--- src/Ubuntu/Components/Themes/themesplugin.h 1970-01-01 00:00:00 +0000
761+++ src/Ubuntu/Components/Themes/themesplugin.h 2015-10-27 11:23:28 +0000
762@@ -0,0 +1,15 @@
763+#ifndef THEMESPLUGIN_H
764+#define THEMESPLUGIN_H
765+
766+#include <QQmlExtensionPlugin>
767+
768+class ThemesPlugin: public QQmlExtensionPlugin
769+{
770+ Q_OBJECT
771+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
772+
773+public:
774+ void registerTypes(const char *uri);
775+};
776+
777+#endif // THEMESPLUGIN_H
778
779=== modified file 'src/Ubuntu/Components/plugin/uctheme.cpp'
780--- src/Ubuntu/Components/plugin/uctheme.cpp 2015-10-20 11:32:09 +0000
781+++ src/Ubuntu/Components/plugin/uctheme.cpp 2015-10-27 11:23:28 +0000
782@@ -40,6 +40,7 @@
783
784 #include <QtQml/private/qqmlproperty_p.h>
785 #include <QtQml/private/qqmlabstractbinding_p.h>
786+#include <QtQml/private/qqmldirparser_p.h>
787 #define foreach Q_FOREACH
788 #include <QtQml/private/qqmlbinding_p.h>
789 #undef foreach
790@@ -169,6 +170,7 @@
791 pathList << qml2ImportPath.split(':', QString::SkipEmptyParts);
792 }
793 pathList << QLibraryInfo::location(QLibraryInfo::Qml2ImportsPath).split(':', QString::SkipEmptyParts);
794+
795 // fix folders
796 QStringList result;
797 Q_FOREACH(const QString &path, pathList) {
798@@ -192,9 +194,37 @@
799 // QUrl needs a trailing slash to understand it's a directory
800 QString absoluteThemeFolder = QDir(themeFolder).absolutePath().append('/');
801 if (QDir(absoluteThemeFolder).exists()) {
802+
803+ QString qmlDirFileName = absoluteThemeFolder + "qmldir";
804 record.deprecated = QFile::exists(absoluteThemeFolder + "deprecated");
805- record.shared = QFile::exists(absoluteThemeFolder + "qmldir");
806+ record.shared = QFile::exists(qmlDirFileName);
807 record.path = QUrl::fromLocalFile(absoluteThemeFolder);
808+
809+ if (record.shared) {
810+ QQmlDirParser qmlDir;
811+ QFile qmlDirFile(qmlDirFileName);
812+
813+ if (!qmlDirFile.open(QIODevice::ReadOnly)) {
814+ qmlInfo(0) << "Could not read qmldir file of "<<record.path<<" skipping";
815+ //return empty ThemeRecord if qmldir is not readable
816+ break;
817+ }
818+
819+ qmlDir.parse(qmlDirFile.readAll());
820+ if (qmlDir.hasError()) {
821+ qmlInfo(0) << "Error parsing file "<<qmlDirFileName
822+ << qmlDir.errors(record.name);
823+ //return empty ThemeRecord if qmldir is not valid
824+ break;
825+ }
826+
827+ Q_FOREACH(const QQmlDirParser::Component &comp, qmlDir.components()) {
828+ if (comp.fileName.startsWith(QStringLiteral("qrc:/"))) {
829+ record.requiresImport = true;
830+ break;
831+ }
832+ }
833+ }
834 break;
835 }
836 }
837@@ -403,6 +433,29 @@
838 Q_EMIT nameChanged();
839 }
840
841+bool UCTheme::loadThemePlugin(const ThemeRecord &theme, quint16 version, const QString &component)
842+{
843+ //In case we ever support changing the engine we need to add additional logic to handle it correctly
844+ if (theme.pluginLoaded)
845+ return true;
846+
847+ static QString qmlTemplate("import QtQuick 2.4\nimport %1 %2.%3\n%4{}");
848+ QQmlComponent comp(m_engine);
849+ comp.setData(qmlTemplate
850+ .arg(theme.name)
851+ .arg(MAJOR_VERSION(version))
852+ .arg(MINOR_VERSION(version))
853+ .arg(component).toUtf8(), QUrl());
854+
855+ if (comp.errors().isEmpty()) {
856+ theme.pluginLoaded = true;
857+ return true;
858+ }
859+
860+ qmlInfo(this) << "Importing the plugin for theme "<<theme.name<<" failed. "<<comp.errors();
861+ return false;
862+}
863+
864 void UCTheme::updateThemePaths()
865 {
866 m_themePaths.clear();
867@@ -569,6 +622,7 @@
868 if (isFallback) {
869 (*isFallback) = false;
870 }
871+
872 Q_FOREACH (const ThemeRecord &themePath, m_themePaths) {
873 QUrl styleUrl;
874 /*
875@@ -588,6 +642,25 @@
876 // we stop at version 1.2 as we do not have support for earlier themes anymore.
877 for (int minor = MINOR_VERSION(styleVersion); minor >= 2; minor--) {
878 QString versionedName = QStringLiteral("%1.%2/%3").arg(MAJOR_VERSION(styleVersion)).arg(minor).arg(styleName);
879+ if (themePath.requiresImport) {
880+ QString prefixedName = themePath.name;
881+ prefixedName.replace(QStringLiteral("."), QStringLiteral("/"));
882+ prefixedName = QStringLiteral("%1/%2")
883+ .arg(prefixedName)
884+ .arg(versionedName);
885+
886+ if (loadThemePlugin(themePath, version, QStringLiteral("Item")) ) {
887+ if (QFile::exists(QStringLiteral(":/")+prefixedName)) {
888+ // set fallback warning if the theme is shared
889+ if (isFallback && (version != styleVersion)) {
890+ (*isFallback) = true;
891+ }
892+ return QUrl(QStringLiteral("qrc:/")+prefixedName);
893+ }
894+ }
895+ }
896+
897+ // no style yet? Maybe its not in the qrc
898 styleUrl = themePath.path.resolved(versionedName);
899 if (styleUrl.isValid() && QFile::exists(styleUrl.toLocalFile())) {
900 // set fallback warning if the theme is shared
901@@ -600,6 +673,21 @@
902
903 // if we don't get any style, get the non-versioned ones for non-shared and deprecated styles
904 if (!themePath.shared || themePath.deprecated) {
905+ if (themePath.requiresImport) {
906+ QString prefixedName = themePath.name;
907+ prefixedName.replace(QStringLiteral("."), QStringLiteral("/"));
908+ prefixedName = QStringLiteral("%1/%2")
909+ .arg(prefixedName)
910+ .arg(styleName);
911+
912+ if (loadThemePlugin(themePath, version, QStringLiteral("Item")) ) {
913+ if (QFile::exists(QStringLiteral(":/")+prefixedName)) {
914+ return QUrl(QStringLiteral("qrc:/")+prefixedName);
915+ }
916+ }
917+ }
918+
919+ //no style yet? fall back to filesystem
920 styleUrl = themePath.path.resolved(styleName);
921 if (styleUrl.isValid() && QFile::exists(styleUrl.toLocalFile())) {
922 return styleUrl;
923@@ -703,7 +791,6 @@
924 }
925 }
926 }
927-
928 return component;
929 }
930
931
932=== modified file 'src/Ubuntu/Components/plugin/uctheme.h'
933--- src/Ubuntu/Components/plugin/uctheme.h 2015-10-20 11:32:09 +0000
934+++ src/Ubuntu/Components/plugin/uctheme.h 2015-10-27 11:23:28 +0000
935@@ -47,7 +47,7 @@
936 static quint16 previousVersion;
937 struct ThemeRecord {
938 ThemeRecord() :
939- shared(false), deprecated(false)
940+ shared(false), deprecated(false), requiresImport(false), pluginLoaded(false)
941 {}
942 ThemeRecord(const QString &name, const QUrl &path, bool shared, bool deprecated) :
943 name(name), path(path), shared(shared), deprecated(deprecated)
944@@ -61,6 +61,8 @@
945 QUrl path;
946 bool shared:1;
947 bool deprecated:1;
948+ bool requiresImport:1;
949+ mutable bool pluginLoaded: 1;
950 };
951
952 explicit UCTheme(QObject *parent = 0);
953@@ -100,7 +102,6 @@
954 {
955 m_completed = true;
956 }
957-
958 private Q_SLOTS:
959 void resetPalette();
960 void _q_defaultThemeChanged();
961@@ -112,6 +113,7 @@
962 void updateThemePaths();
963 QUrl styleUrl(const QString& styleName, quint16 version, bool *isFallback = NULL);
964 void loadPalette(bool notify = true);
965+ bool loadThemePlugin(const ThemeRecord &theme, quint16 version, const QString &component);
966 void updateThemedItems();
967
968 class PaletteConfig

Subscribers

People subscribed via source and target branches