Merge lp:~nik90/podbird/1-add-theming-support into lp:podbird
- 1-add-theming-support
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Michael Sheldon |
Approved revision: | 47 |
Merged at revision: | 36 |
Proposed branch: | lp:~nik90/podbird/1-add-theming-support |
Merge into: | lp:podbird |
Prerequisite: | lp:~nik90/podbird/0-clean-bottom-bar |
Diff against target: |
1058 lines (+463/-78) 15 files modified
app/CMakeLists.txt (+1/-0) app/podbird.qml (+53/-14) app/themes/CMakeLists.txt (+7/-0) app/themes/Dark.qml (+44/-0) app/themes/Light.qml (+44/-0) app/themes/ThemeManager.qml (+34/-0) app/ui/EmptyState.qml (+6/-5) app/ui/EpisodesPage.qml (+42/-11) app/ui/ExpandableListItem.qml (+87/-0) app/ui/NowPlayingPage.qml (+12/-2) app/ui/PlayerControls.qml (+7/-7) app/ui/PodcastsTab.qml (+14/-5) app/ui/SearchTab.qml (+9/-1) app/ui/SettingsTab.qml (+66/-0) po/com.mikeasoft.podbird.pot (+37/-33) |
To merge this branch: | bzr merge lp:~nik90/podbird/1-add-theming-support |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Sheldon | Needs Information | ||
Review via email: mp+252214@code.launchpad.net |
Commit message
- Added theming support for Podbird. Two themes light and dark theme have been created. Default theme is still the light theme.
- Updated QtQuick to 2.3
- Fixed status icons in the episode page not being vertically centered correctly
- Added a settings page
Description of the change
This MP adds theming support for Podbird. I have added two themes dark and light. The default theme is still the light theme, so existing users won't see any change while users who prefer the dark theme can switch to it.
I also updated QtQuick to 2.3, fixed status icons in the episode page not being vertically centered correctly in v0.4 and also added a new settings page.
- 41. By Nekhelesh Ramananthan
-
Added credit to micheal hall for his ThemeManager
Michael Sheldon (michael-sheldon) wrote : | # |
Nekhelesh Ramananthan (nik90) wrote : | # |
> Just had a cursory glance through the code so far, which looks good, but I
> don't think we can merge this until the licensing of the ThemeManager
> component is clear.
Agreed. I have sent an email to Michael Hall (cced it to you as well) about this. Once I get it, I will update the MP.
- 42. By Nekhelesh Ramananthan
-
Made expandable listitem into a reusuable component so that it can be used for other settings options as well
Nekhelesh Ramananthan (nik90) wrote : | # |
@michael, I emailed michael hall and he said the license is BSD and that we can have it in the license of our choice. I looked through wikipedia and it seems some versions of BSD are compatible with GPL v3. Would you like to keep the same license or change it to GPL?
- 43. By Nekhelesh Ramananthan
-
Updated thememanager copyright header
- 44. By Nekhelesh Ramananthan
-
Made ExpandableListItem title and subtitle APIs public
- 45. By Nekhelesh Ramananthan
-
Merged lp:podbird
- 46. By Nekhelesh Ramananthan
-
Made the expandable listitem API more standard (similar to what was done in the clock app)
- 47. By Nekhelesh Ramananthan
-
Updated ThemeManager to the latest version provided by michael hall
Preview Diff
1 | === modified file 'app/CMakeLists.txt' |
2 | --- app/CMakeLists.txt 2015-01-04 10:20:41 +0000 |
3 | +++ app/CMakeLists.txt 2015-03-27 15:28:51 +0000 |
4 | @@ -10,4 +10,5 @@ |
5 | install(FILES ${QML_JS_FILES} DESTINATION ${PODBIRD_DIR}) |
6 | |
7 | add_subdirectory(ui) |
8 | +add_subdirectory(themes) |
9 | |
10 | |
11 | === modified file 'app/podbird.qml' |
12 | --- app/podbird.qml 2015-03-02 23:04:31 +0000 |
13 | +++ app/podbird.qml 2015-03-27 15:28:51 +0000 |
14 | @@ -1,38 +1,72 @@ |
15 | -import QtQuick 2.0 |
16 | +/* |
17 | + * Copyright 2015 Michael Sheldon <mike@mikeasoft.com> |
18 | + * |
19 | + * This file is part of Podbird. |
20 | + * |
21 | + * Podbird is free software; you can redistribute it and/or modify |
22 | + * it under the terms of the GNU General Public License as published by |
23 | + * the Free Software Foundation; version 3. |
24 | + * |
25 | + * Podbird is distributed in the hope that it will be useful, |
26 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
27 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
28 | + * GNU General Public License for more details. |
29 | + * |
30 | + * You should have received a copy of the GNU General Public License |
31 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
32 | + */ |
33 | + |
34 | +import QtQuick 2.3 |
35 | +import Podbird 1.0 |
36 | import QtMultimedia 5.0 |
37 | +import Qt.labs.settings 1.0 |
38 | +import Ubuntu.Components 1.1 |
39 | import QtQuick.LocalStorage 2.0 |
40 | import Ubuntu.DownloadManager 0.1 |
41 | -import Ubuntu.Components 1.1 |
42 | -import Podbird 1.0 |
43 | import "ui" |
44 | +import "themes" as Themes |
45 | import "podcasts.js" as Podcasts |
46 | |
47 | MainView { |
48 | - id: mainView |
49 | + id: podbird |
50 | |
51 | objectName: "mainView" |
52 | applicationName: "com.mikeasoft.podbird" |
53 | - |
54 | - property string currentName |
55 | - property string currentArtist |
56 | - property string currentImage |
57 | - property string currentGuid |
58 | - |
59 | useDeprecatedToolbar: false |
60 | anchorToKeyboard: true |
61 | |
62 | width: units.gu(50) |
63 | height: units.gu(75) |
64 | |
65 | - FileManager { |
66 | - id: fileManager |
67 | - } |
68 | + backgroundColor: theme.background |
69 | |
70 | Component.onDestruction: { |
71 | console.log("Download cancelled"); |
72 | downloader.cancel(); |
73 | } |
74 | |
75 | + property string currentName |
76 | + property string currentArtist |
77 | + property string currentImage |
78 | + property string currentGuid |
79 | + |
80 | + Themes.ThemeManager { |
81 | + id: themeManager |
82 | + source: settings.themeName |
83 | + } |
84 | + |
85 | + property alias theme: themeManager.theme |
86 | + property var themeManager: themeManager |
87 | + |
88 | + property var settings: Settings { |
89 | + // Set "Light.qml" as the default theme |
90 | + property string themeName: "Light.qml" |
91 | + } |
92 | + |
93 | + FileManager { |
94 | + id: fileManager |
95 | + } |
96 | + |
97 | SingleDownload { |
98 | id: imageDownloader |
99 | property string feed; |
100 | @@ -103,8 +137,14 @@ |
101 | } |
102 | |
103 | SearchTab { |
104 | + id: searchTab |
105 | objectName: "searchTab" |
106 | } |
107 | + |
108 | + SettingsTab { |
109 | + id: settingsTab |
110 | + objectName: "settingsTab" |
111 | + } |
112 | } |
113 | } |
114 | |
115 | @@ -136,4 +176,3 @@ |
116 | } |
117 | } |
118 | } |
119 | - |
120 | |
121 | === added directory 'app/themes' |
122 | === added file 'app/themes/CMakeLists.txt' |
123 | --- app/themes/CMakeLists.txt 1970-01-01 00:00:00 +0000 |
124 | +++ app/themes/CMakeLists.txt 2015-03-27 15:28:51 +0000 |
125 | @@ -0,0 +1,7 @@ |
126 | +file(GLOB THEME_FILES *.qml) |
127 | + |
128 | +# Make the files visible in the qtcreator tree |
129 | +add_custom_target(podbird_THEMEFiles ALL SOURCES ${THEME_FILES}) |
130 | + |
131 | +install(FILES ${THEME_FILES} DESTINATION ${PODBIRD_DIR}/themes) |
132 | + |
133 | |
134 | === added file 'app/themes/Dark.qml' |
135 | --- app/themes/Dark.qml 1970-01-01 00:00:00 +0000 |
136 | +++ app/themes/Dark.qml 2015-03-27 15:28:51 +0000 |
137 | @@ -0,0 +1,44 @@ |
138 | +/* |
139 | + * Copyright 2015 Podbird Team |
140 | + * |
141 | + * This file is part of Podbird. |
142 | + * |
143 | + * Podbird is free software; you can redistribute it and/or modify |
144 | + * it under the terms of the GNU General Public License as published by |
145 | + * the Free Software Foundation; version 3. |
146 | + * |
147 | + * Podbird is distributed in the hope that it will be useful, |
148 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
149 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
150 | + * GNU General Public License for more details. |
151 | + * |
152 | + * You should have received a copy of the GNU General Public License |
153 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
154 | + */ |
155 | + |
156 | +import QtQuick 2.3 |
157 | +import Ubuntu.Components 1.1 |
158 | + |
159 | +QtObject { |
160 | + // MainView |
161 | + property color background: "#1E1E23" |
162 | + |
163 | + // Main Text Colors |
164 | + property color baseText: "White" |
165 | + property color baseSubText: "#999999" |
166 | + property color focusText: "#FF9900" |
167 | + |
168 | + // Icon Colors |
169 | + property color baseIcon: "White" |
170 | + |
171 | + // Button Colors |
172 | + property color positiveActionButton: UbuntuColors.green |
173 | + property color negativeActionButton: UbuntuColors.red |
174 | + property color neutralActionButton: UbuntuColors.coolGrey |
175 | + |
176 | + // Bottom Player Bar Colors |
177 | + property color bottomBarBackground: "#0F0F0F" |
178 | + |
179 | + // Highlight Color |
180 | + property color hightlightListView: "#2C2C34" |
181 | +} |
182 | |
183 | === added file 'app/themes/Light.qml' |
184 | --- app/themes/Light.qml 1970-01-01 00:00:00 +0000 |
185 | +++ app/themes/Light.qml 2015-03-27 15:28:51 +0000 |
186 | @@ -0,0 +1,44 @@ |
187 | +/* |
188 | + * Copyright 2015 Podbird Team |
189 | + * |
190 | + * This file is part of Podbird. |
191 | + * |
192 | + * Podbird is free software; you can redistribute it and/or modify |
193 | + * it under the terms of the GNU General Public License as published by |
194 | + * the Free Software Foundation; version 3. |
195 | + * |
196 | + * Podbird is distributed in the hope that it will be useful, |
197 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
198 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
199 | + * GNU General Public License for more details. |
200 | + * |
201 | + * You should have received a copy of the GNU General Public License |
202 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
203 | + */ |
204 | + |
205 | +import QtQuick 2.3 |
206 | +import Ubuntu.Components 1.1 |
207 | + |
208 | +QtObject { |
209 | + // MainView |
210 | + property color background: "#EEEEEE" |
211 | + |
212 | + // Main Text Colors |
213 | + property color baseText: UbuntuColors.darkGrey |
214 | + property color baseSubText: "#999999" |
215 | + property color focusText: UbuntuColors.orange |
216 | + |
217 | + // Icon Colors |
218 | + property color baseIcon: UbuntuColors.darkGrey |
219 | + |
220 | + // Button Colors |
221 | + property color positiveActionButton: UbuntuColors.green |
222 | + property color negativeActionButton: UbuntuColors.red |
223 | + property color neutralActionButton: UbuntuColors.coolGrey |
224 | + |
225 | + // Bottom Player Bar Colors |
226 | + property color bottomBarBackground: "#0F0F0F" |
227 | + |
228 | + // Highlight Color |
229 | + property color hightlightListView: "#D8D8D8" |
230 | +} |
231 | |
232 | === added file 'app/themes/ThemeManager.qml' |
233 | --- app/themes/ThemeManager.qml 1970-01-01 00:00:00 +0000 |
234 | +++ app/themes/ThemeManager.qml 2015-03-27 15:28:51 +0000 |
235 | @@ -0,0 +1,34 @@ |
236 | +/* |
237 | + * Copyright 2015 Michael Hall <mhall119@ubuntu.com> |
238 | + * |
239 | + * This file is part of Podbird. |
240 | + * |
241 | + * Podbird is free software; you can redistribute it and/or modify |
242 | + * it under the terms of the GNU General Public License as published by |
243 | + * the Free Software Foundation; version 3. |
244 | + * |
245 | + * Podbird is distributed in the hope that it will be useful, |
246 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
247 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
248 | + * GNU General Public License for more details. |
249 | + * |
250 | + * You should have received a copy of the GNU General Public License |
251 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
252 | + */ |
253 | + |
254 | +import QtQuick 2.3 |
255 | +import Ubuntu.Components 1.1 |
256 | + |
257 | +QtObject { |
258 | + id: themeManager |
259 | + |
260 | + property QtObject theme |
261 | + property string source |
262 | + |
263 | + onSourceChanged: { |
264 | + var themeComponent = Qt.createComponent(source) |
265 | + if (themeComponent.status == Component.Ready) { |
266 | + themeManager.theme = themeComponent.createObject(themeManager) |
267 | + } |
268 | + } |
269 | +} |
270 | |
271 | === modified file 'app/ui/EmptyState.qml' |
272 | --- app/ui/EmptyState.qml 2015-01-24 16:48:16 +0000 |
273 | +++ app/ui/EmptyState.qml 2015-03-27 15:28:51 +0000 |
274 | @@ -37,10 +37,10 @@ |
275 | |
276 | Icon { |
277 | id: emptyIcon |
278 | - anchors.horizontalCenter: parent.horizontalCenter |
279 | + width: height |
280 | height: units.gu(10) |
281 | - width: height |
282 | - color: "#BBBBBB" |
283 | + color: podbird.theme.baseIcon |
284 | + anchors.horizontalCenter: parent.horizontalCenter |
285 | } |
286 | |
287 | Label { |
288 | @@ -49,14 +49,15 @@ |
289 | anchors.topMargin: units.gu(5) |
290 | anchors.horizontalCenter: parent.horizontalCenter |
291 | fontSize: "large" |
292 | - font.bold: true |
293 | + color: podbird.theme.baseText |
294 | } |
295 | |
296 | Label { |
297 | id: emptySublabel |
298 | - anchors.top: emptyLabel.bottom |
299 | anchors.left: parent.left |
300 | anchors.right: parent.right |
301 | + anchors.top: emptyLabel.bottom |
302 | + color: podbird.theme.baseSubText |
303 | horizontalAlignment: Text.AlignHCenter |
304 | wrapMode: Text.WrapAtWordBoundaryOrAnywhere |
305 | } |
306 | |
307 | === modified file 'app/ui/EpisodesPage.qml' |
308 | --- app/ui/EpisodesPage.qml 2015-03-26 12:12:17 +0000 |
309 | +++ app/ui/EpisodesPage.qml 2015-03-27 15:28:51 +0000 |
310 | @@ -1,4 +1,22 @@ |
311 | -import QtQuick 2.0 |
312 | +/* |
313 | + * Copyright 2015 Podbird Team |
314 | + * |
315 | + * This file is part of Podbird. |
316 | + * |
317 | + * Podbird is free software; you can redistribute it and/or modify |
318 | + * it under the terms of the GNU General Public License as published by |
319 | + * the Free Software Foundation; version 3. |
320 | + * |
321 | + * Podbird is distributed in the hope that it will be useful, |
322 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
323 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
324 | + * GNU General Public License for more details. |
325 | + * |
326 | + * You should have received a copy of the GNU General Public License |
327 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
328 | + */ |
329 | + |
330 | +import QtQuick 2.3 |
331 | import QtMultimedia 5.0 |
332 | import Ubuntu.Components 1.1 |
333 | import QtQuick.Layouts 1.1 |
334 | @@ -110,7 +128,7 @@ |
335 | contents: TextField { |
336 | id: searchField |
337 | inputMethodHints: Qt.ImhNoPredictiveText |
338 | - placeholderText: i18n.tr("Search Episode...") |
339 | + placeholderText: i18n.tr("Search episode") |
340 | anchors.left: parent ? parent.left : undefined |
341 | anchors.right: parent ? parent.right : undefined |
342 | anchors.rightMargin: units.gu(2) |
343 | @@ -132,8 +150,8 @@ |
344 | title: i18n.tr("Unsubscribe Confirmation") |
345 | text: i18n.tr("Are you sure you want to unsubscribe from <b>%1</b>?").arg(episodesPage.episodeName) |
346 | Button { |
347 | - text: i18n.tr("Yes") |
348 | - color: UbuntuColors.orange |
349 | + text: i18n.tr("Unsubscribe") |
350 | + color: podbird.theme.negativeActionButton |
351 | onClicked: { |
352 | var db = Podcasts.init(); |
353 | db.transaction(function (tx) { |
354 | @@ -149,8 +167,8 @@ |
355 | } |
356 | } |
357 | Button { |
358 | - text: i18n.tr("No") |
359 | - color: UbuntuColors.green |
360 | + text: i18n.tr("Cancel") |
361 | + color: podbird.theme.neutralActionButton |
362 | onClicked: { |
363 | PopupUtils.close(dialogInternal) |
364 | } |
365 | @@ -200,9 +218,15 @@ |
366 | |
367 | width: parent.width |
368 | height: mainColumn.height |
369 | + highlightWhenPressed: false |
370 | |
371 | onClicked: listItem.expanded = !listItem.expanded |
372 | |
373 | + Rectangle { |
374 | + anchors.fill: parent |
375 | + color: listItem.pressed ? podbird.theme.hightlightListView : "transparent" |
376 | + } |
377 | + |
378 | Column { |
379 | id: mainColumn |
380 | |
381 | @@ -243,8 +267,8 @@ |
382 | maximumLineCount: 2 |
383 | wrapMode: Text.WordWrap |
384 | elide: Text.ElideRight |
385 | - color: currentGuid === model.guid ? UbuntuColors.orange |
386 | - : Theme.palette.normal.fieldText |
387 | + color: currentGuid === model.guid ? podbird.theme.focusText |
388 | + : podbird.theme.baseText |
389 | } |
390 | |
391 | Label { |
392 | @@ -252,8 +276,8 @@ |
393 | width: parent.width |
394 | text: Qt.formatDate(new Date(model.published), "MMM d, yyyy") |
395 | fontSize: "x-small" |
396 | - color: currentGuid === model.guid ? UbuntuColors.orange |
397 | - : Theme.palette.normal.fieldText |
398 | + color: currentGuid === model.guid ? podbird.theme.focusText |
399 | + : podbird.theme.baseText |
400 | elide: Text.ElideRight |
401 | } |
402 | } |
403 | @@ -269,7 +293,7 @@ |
404 | width: parent.width |
405 | elide: Text.ElideRight |
406 | fontSize: "small" |
407 | - color: "#999999" |
408 | + color: podbird.theme.baseSubText |
409 | Behavior on height { |
410 | UbuntuNumberAnimation { |
411 | duration: UbuntuAnimation.SlowDuration |
412 | @@ -326,6 +350,7 @@ |
413 | radius: width / 2 |
414 | anchors.right: durationIcon.left |
415 | anchors.rightMargin: units.gu(2) |
416 | + anchors.verticalCenter: actionRow.verticalCenter |
417 | visible: model.listened |
418 | Icon { |
419 | id: tick |
420 | @@ -345,10 +370,13 @@ |
421 | visible: duration.text !== "" |
422 | anchors.right: duration.left |
423 | anchors.rightMargin: units.gu(0.5) |
424 | + anchors.verticalCenter: actionRow.verticalCenter |
425 | + color: podbird.theme.baseIcon |
426 | } |
427 | |
428 | Label { |
429 | id: duration |
430 | + color: podbird.theme.baseText |
431 | anchors.right: parent.right |
432 | anchors.verticalCenter: durationIcon.verticalCenter |
433 | fontSize: "small" |
434 | @@ -393,6 +421,7 @@ |
435 | name: player.playbackState === MediaPlayer.PlayingState && currentGuid === model.guid ? "media-playback-pause" |
436 | : "media-playback-start" |
437 | width: units.gu(2.5) |
438 | + color: podbird.theme.baseIcon |
439 | height: width |
440 | anchors.centerIn: parent |
441 | } |
442 | @@ -417,6 +446,7 @@ |
443 | anchors.centerIn: parent |
444 | width: units.gu(2.5) |
445 | height: width |
446 | + color: podbird.theme.baseIcon |
447 | opacity: downloader.downloadingGuid === model.guid ? 0.4 : 1.0 |
448 | } |
449 | |
450 | @@ -449,6 +479,7 @@ |
451 | anchors.right: model.listened ? listened.left : durationIcon.left |
452 | anchors.leftMargin: units.gu(2) |
453 | anchors.rightMargin: units.gu(2) |
454 | + anchors.verticalCenter: actionRow.verticalCenter |
455 | height: units.gu(2.6) |
456 | value: downloader.progress |
457 | } |
458 | |
459 | === added file 'app/ui/ExpandableListItem.qml' |
460 | --- app/ui/ExpandableListItem.qml 1970-01-01 00:00:00 +0000 |
461 | +++ app/ui/ExpandableListItem.qml 2015-03-27 15:28:51 +0000 |
462 | @@ -0,0 +1,87 @@ |
463 | +/* |
464 | + * Copyright 2015 Podbird Team |
465 | + * |
466 | + * This file is part of Podbird. |
467 | + * |
468 | + * Podbird is free software; you can redistribute it and/or modify |
469 | + * it under the terms of the GNU General Public License as published by |
470 | + * the Free Software Foundation; version 3. |
471 | + * |
472 | + * Podbird is distributed in the hope that it will be useful, |
473 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
474 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
475 | + * GNU General Public License for more details. |
476 | + * |
477 | + * You should have received a copy of the GNU General Public License |
478 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
479 | + */ |
480 | + |
481 | +import QtQuick 2.3 |
482 | +import Ubuntu.Components 1.1 |
483 | +import Ubuntu.Components.ListItems 1.0 as ListItem |
484 | + |
485 | +ListItem.Expandable { |
486 | + id: expandableListItem |
487 | + |
488 | + property ListModel model |
489 | + property Component delegate |
490 | + property alias text: expandableHeader.text |
491 | + property alias subText: expandableHeader.subText |
492 | + property alias listViewHeight: expandableList.height |
493 | + |
494 | + anchors { |
495 | + left: parent.left |
496 | + right: parent.right |
497 | + margins: units.gu(-2) |
498 | + } |
499 | + |
500 | + collapseOnClick: true |
501 | + expandedHeight: contentColumn.height + units.gu(1) |
502 | + |
503 | + Column { |
504 | + id: contentColumn |
505 | + |
506 | + anchors { |
507 | + left: parent.left |
508 | + right: parent.right |
509 | + } |
510 | + |
511 | + Item { |
512 | + width: parent.width |
513 | + height: expandableListItem.collapsedHeight |
514 | + |
515 | + ListItem.Subtitled { |
516 | + id: expandableHeader |
517 | + |
518 | + onClicked: expandableListItem.expanded = true |
519 | + |
520 | + Icon { |
521 | + id: arrow |
522 | + |
523 | + width: units.gu(2) |
524 | + height: width |
525 | + anchors.right: parent.right |
526 | + anchors.verticalCenter: parent.verticalCenter |
527 | + |
528 | + name: "go-down" |
529 | + color: "Grey" |
530 | + rotation: expandableListItem.expanded ? 180 : 0 |
531 | + |
532 | + Behavior on rotation { |
533 | + UbuntuNumberAnimation {} |
534 | + } |
535 | + } |
536 | + } |
537 | + } |
538 | + |
539 | + ListView { |
540 | + id: expandableList |
541 | + |
542 | + height: units.gu(11) |
543 | + width: parent.width |
544 | + interactive: false |
545 | + model: expandableListItem.model |
546 | + delegate: expandableListItem.delegate |
547 | + } |
548 | + } |
549 | +} |
550 | |
551 | === modified file 'app/ui/NowPlayingPage.qml' |
552 | --- app/ui/NowPlayingPage.qml 2015-03-01 21:16:35 +0000 |
553 | +++ app/ui/NowPlayingPage.qml 2015-03-27 15:28:51 +0000 |
554 | @@ -16,7 +16,7 @@ |
555 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
556 | */ |
557 | |
558 | -import QtQuick 2.0 |
559 | +import QtQuick 2.3 |
560 | import QtMultimedia 5.0 |
561 | import Ubuntu.Components 1.1 |
562 | import "../podcasts.js" as Podcasts |
563 | @@ -35,7 +35,8 @@ |
564 | anchors.left: parent.left |
565 | anchors.top: parent.top |
566 | anchors.right: parent.right |
567 | - height: title.lineCount === 1 ? parent.height/2 + units.gu(3) : parent.height/2 |
568 | + height: title.lineCount === 1 ? parent.height/2 + units.gu(3) |
569 | + : parent.height/2 |
570 | art: currentImage |
571 | |
572 | Image { |
573 | @@ -59,6 +60,7 @@ |
574 | fontSize: "large" |
575 | maximumLineCount: 2 |
576 | wrapMode: Text.WordWrap |
577 | + color: podbird.theme.baseText |
578 | } |
579 | |
580 | Label { |
581 | @@ -70,6 +72,7 @@ |
582 | text: currentArtist |
583 | elide: Text.ElideRight |
584 | fontSize: "small" |
585 | + color: podbird.theme.baseSubText |
586 | } |
587 | |
588 | Slider { |
589 | @@ -103,6 +106,7 @@ |
590 | fontSize: "small" |
591 | anchors.left: scrubber.left |
592 | anchors.top: scrubber.bottom |
593 | + color: podbird.theme.baseText |
594 | text: Podcasts.formatTime(player.position / 1000) |
595 | } |
596 | |
597 | @@ -111,6 +115,7 @@ |
598 | fontSize: "small" |
599 | anchors.right: scrubber.right |
600 | anchors.top: scrubber.bottom |
601 | + color: podbird.theme.baseText |
602 | text: Podcasts.formatTime(player.duration / 1000) |
603 | } |
604 | |
605 | @@ -139,6 +144,7 @@ |
606 | Label { |
607 | text: i18n.tr("-15s") |
608 | fontSize: "xx-small" |
609 | + color: podbird.theme.baseText |
610 | anchors.verticalCenter: skipBackwardIcon.verticalCenter |
611 | } |
612 | |
613 | @@ -147,6 +153,7 @@ |
614 | width: units.gu(3) |
615 | height: width |
616 | name: "media-seek-backward" |
617 | + color: podbird.theme.baseIcon |
618 | } |
619 | } |
620 | } |
621 | @@ -163,6 +170,7 @@ |
622 | width: units.gu(6) |
623 | height: width |
624 | anchors.centerIn: parent |
625 | + color: podbird.theme.baseIcon |
626 | name: player.playbackState === MediaPlayer.PlayingState ? "media-playback-pause" |
627 | : "media-playback-start" |
628 | } |
629 | @@ -189,11 +197,13 @@ |
630 | width: units.gu(3) |
631 | height: width |
632 | name: "media-seek-forward" |
633 | + color: podbird.theme.baseIcon |
634 | } |
635 | |
636 | Label { |
637 | text: i18n.tr("+15s") |
638 | fontSize: "xx-small" |
639 | + color: podbird.theme.baseText |
640 | anchors.verticalCenter: skipForwardIcon.verticalCenter |
641 | } |
642 | } |
643 | |
644 | === modified file 'app/ui/PlayerControls.qml' |
645 | --- app/ui/PlayerControls.qml 2015-03-02 22:53:50 +0000 |
646 | +++ app/ui/PlayerControls.qml 2015-03-27 15:28:51 +0000 |
647 | @@ -16,7 +16,7 @@ |
648 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
649 | */ |
650 | |
651 | -import QtQuick 2.0 |
652 | +import QtQuick 2.3 |
653 | import QtMultimedia 5.0 |
654 | import Ubuntu.Components 1.1 |
655 | import "../podcasts.js" as Podcasts |
656 | @@ -25,8 +25,8 @@ |
657 | id: controlRect |
658 | |
659 | height: 0 |
660 | - color: "black" |
661 | width: parent.width |
662 | + color: podbird.theme.bottomBarBackground |
663 | |
664 | MouseArea { |
665 | z: -1 |
666 | @@ -65,8 +65,8 @@ |
667 | anchors.leftMargin: units.gu(2) |
668 | |
669 | Label { |
670 | + fontSize: "small" |
671 | font.weight: Font.Bold |
672 | - fontSize: "small" |
673 | anchors.left: parent.left |
674 | anchors.right: parent.right |
675 | color: "white" |
676 | @@ -77,13 +77,13 @@ |
677 | } |
678 | |
679 | Label { |
680 | - font.weight: Font.Light |
681 | fontSize: "small" |
682 | - anchors.left: parent.left |
683 | - anchors.right: parent.right |
684 | color: "#999999" |
685 | - elide: Text.ElideRight |
686 | text: currentArtist |
687 | + elide: Text.ElideRight |
688 | + font.weight: Font.Light |
689 | + anchors.left: parent.left |
690 | + anchors.right: parent.right |
691 | } |
692 | } |
693 | |
694 | |
695 | === modified file 'app/ui/PodcastsTab.qml' |
696 | --- app/ui/PodcastsTab.qml 2015-01-30 00:22:36 +0000 |
697 | +++ app/ui/PodcastsTab.qml 2015-03-27 15:28:51 +0000 |
698 | @@ -16,7 +16,7 @@ |
699 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
700 | */ |
701 | |
702 | -import QtQuick 2.0 |
703 | +import QtQuick 2.3 |
704 | import QtMultimedia 5.0 |
705 | import QtQuick.Layouts 1.1 |
706 | import QtQuick.LocalStorage 2.0 |
707 | @@ -94,7 +94,7 @@ |
708 | contents: TextField { |
709 | id: searchField |
710 | inputMethodHints: Qt.ImhNoPredictiveText |
711 | - placeholderText: i18n.tr("Search Podcast...") |
712 | + placeholderText: i18n.tr("Search podcast") |
713 | anchors.left: parent ? parent.left : undefined |
714 | anchors.right: parent ? parent.right : undefined |
715 | anchors.rightMargin: units.gu(2) |
716 | @@ -130,7 +130,7 @@ |
717 | contents: TextField { |
718 | id: feedUrlField |
719 | inputMethodHints: Qt.ImhUrlCharactersOnly |
720 | - placeholderText: i18n.tr("Feed URL...") |
721 | + placeholderText: i18n.tr("Feed URL") |
722 | anchors.left: parent ? parent.left : undefined |
723 | anchors.right: parent ? parent.right : undefined |
724 | onAccepted: { |
725 | @@ -158,6 +158,7 @@ |
726 | text: i18n.tr("Please check the URL and try again") |
727 | Button { |
728 | text: i18n.tr("Close") |
729 | + color: podbird.theme.neutralActionButton |
730 | onClicked: PopupUtils.close(dialogInternal) |
731 | } |
732 | } |
733 | @@ -212,6 +213,8 @@ |
734 | height: units.gu(8) |
735 | removable: true |
736 | confirmRemoval: true |
737 | + highlightWhenPressed: false |
738 | + |
739 | onItemRemoved: { |
740 | var db = Podcasts.init(); |
741 | db.transaction(function (tx) { |
742 | @@ -225,6 +228,11 @@ |
743 | }); |
744 | } |
745 | |
746 | + Rectangle { |
747 | + anchors.fill: parent |
748 | + color: listItem.pressed ? podbird.theme.hightlightListView : "transparent" |
749 | + } |
750 | + |
751 | onClicked: { |
752 | if(podcastPage.state === "search") { |
753 | view.forceActiveFocus() |
754 | @@ -271,15 +279,16 @@ |
755 | width: parent.width |
756 | fontSize: "small" |
757 | elide: Text.ElideRight |
758 | + color: podbird.theme.baseText |
759 | } |
760 | |
761 | Label { |
762 | id: episodeCount |
763 | width: parent.width |
764 | - color: "#999999" |
765 | + fontSize: "x-small" |
766 | + color: podbird.theme.baseSubText |
767 | visible: model.episodeCount > 0 |
768 | text: i18n.tr("%1 unheard episode", "%1 unheard episodes", model.episodeCount).arg(model.episodeCount) |
769 | - fontSize: "x-small" |
770 | } |
771 | } |
772 | } |
773 | |
774 | === modified file 'app/ui/SearchTab.qml' |
775 | --- app/ui/SearchTab.qml 2015-02-28 13:35:03 +0000 |
776 | +++ app/ui/SearchTab.qml 2015-03-27 15:28:51 +0000 |
777 | @@ -16,7 +16,7 @@ |
778 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
779 | */ |
780 | |
781 | -import QtQuick 2.0 |
782 | +import QtQuick 2.3 |
783 | import QtQuick.Layouts 1.1 |
784 | import Ubuntu.Components 1.1 |
785 | import QtQuick.LocalStorage 2.0 |
786 | @@ -62,8 +62,15 @@ |
787 | } |
788 | |
789 | delegate: ListItem.Empty { |
790 | + id: listItem |
791 | |
792 | height: units.gu(8) |
793 | + highlightWhenPressed: false |
794 | + |
795 | + Rectangle { |
796 | + anchors.fill: parent |
797 | + color: listItem.pressed ? podbird.theme.hightlightListView : "transparent" |
798 | + } |
799 | |
800 | RowLayout { |
801 | id: titleRow |
802 | @@ -112,6 +119,7 @@ |
803 | Button { |
804 | anchors.right: parent.right |
805 | text: i18n.tr("Subscribe") |
806 | + color: UbuntuColors.green |
807 | onClicked: { |
808 | Podcasts.subscribe(model.artist, model.name, model.feed, model.image); |
809 | imageDownloader.feed = model.feed; |
810 | |
811 | === added file 'app/ui/SettingsTab.qml' |
812 | --- app/ui/SettingsTab.qml 1970-01-01 00:00:00 +0000 |
813 | +++ app/ui/SettingsTab.qml 2015-03-27 15:28:51 +0000 |
814 | @@ -0,0 +1,66 @@ |
815 | +/* |
816 | + * Copyright 2015 Podbird Team |
817 | + * |
818 | + * This file is part of Podbird. |
819 | + * |
820 | + * Podbird is free software; you can redistribute it and/or modify |
821 | + * it under the terms of the GNU General Public License as published by |
822 | + * the Free Software Foundation; version 3. |
823 | + * |
824 | + * Podbird is distributed in the hope that it will be useful, |
825 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
826 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
827 | + * GNU General Public License for more details. |
828 | + * |
829 | + * You should have received a copy of the GNU General Public License |
830 | + * along with this program. If not, see <http://www.gnu.org/licenses/>. |
831 | + */ |
832 | + |
833 | +import QtQuick 2.3 |
834 | +import Ubuntu.Components 1.1 |
835 | +import Ubuntu.Components.ListItems 1.0 as ListItem |
836 | + |
837 | +Tab { |
838 | + id: tab |
839 | + |
840 | + title: i18n.tr("Settings") |
841 | + |
842 | + page: Page { |
843 | + id: settingsPage |
844 | + |
845 | + ListModel { |
846 | + id: themeModel |
847 | + ListElement { name: "Light"; file: "Light.qml" } |
848 | + ListElement { name: "Dark"; file: "Dark.qml" } |
849 | + } |
850 | + |
851 | + ExpandableListItem { |
852 | + id: themeSetting |
853 | + |
854 | + model: themeModel |
855 | + text: i18n.tr("Theme") |
856 | + subText: podbird.settings.themeName.split(".qml")[0] |
857 | + |
858 | + delegate: ListItem.Standard { |
859 | + text: model.name |
860 | + |
861 | + onClicked: { |
862 | + var themeElement = model.file |
863 | + podbird.settings.themeName = themeElement |
864 | + podbird.themeManager.source = themeElement |
865 | + themeSetting.expanded = false |
866 | + } |
867 | + |
868 | + Icon { |
869 | + width: units.gu(2) |
870 | + height: width |
871 | + name: "ok" |
872 | + visible: podbird.settings.themeName === model.file |
873 | + anchors.right: parent.right |
874 | + anchors.rightMargin: units.gu(2) |
875 | + anchors.verticalCenter: parent.verticalCenter |
876 | + } |
877 | + } |
878 | + } |
879 | + } |
880 | +} |
881 | |
882 | === modified file 'po/com.mikeasoft.podbird.pot' |
883 | --- po/com.mikeasoft.podbird.pot 2015-03-26 12:12:17 +0000 |
884 | +++ po/com.mikeasoft.podbird.pot 2015-03-27 15:28:51 +0000 |
885 | @@ -8,7 +8,7 @@ |
886 | msgstr "" |
887 | "Project-Id-Version: \n" |
888 | "Report-Msgid-Bugs-To: \n" |
889 | -"POT-Creation-Date: 2015-03-26 13:11+0100\n" |
890 | +"POT-Creation-Date: 2015-03-27 16:25+0100\n" |
891 | "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" |
892 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
893 | "Language-Team: LANGUAGE <LL@li.org>\n" |
894 | @@ -18,63 +18,59 @@ |
895 | "Content-Transfer-Encoding: 8bit\n" |
896 | "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" |
897 | |
898 | -#: ../app/ui/EpisodesPage.qml:67 |
899 | +#: ../app/ui/EpisodesPage.qml:85 |
900 | msgid "Search Episode" |
901 | msgstr "" |
902 | |
903 | -#: ../app/ui/EpisodesPage.qml:76 |
904 | +#: ../app/ui/EpisodesPage.qml:94 |
905 | msgid "Mark all listened" |
906 | msgstr "" |
907 | |
908 | -#: ../app/ui/EpisodesPage.qml:87 |
909 | +#: ../app/ui/EpisodesPage.qml:105 ../app/ui/EpisodesPage.qml:153 |
910 | msgid "Unsubscribe" |
911 | msgstr "" |
912 | |
913 | -#: ../app/ui/EpisodesPage.qml:102 ../app/ui/PodcastsTab.qml:86 |
914 | +#: ../app/ui/EpisodesPage.qml:120 ../app/ui/PodcastsTab.qml:86 |
915 | #: ../app/ui/PodcastsTab.qml:109 |
916 | msgid "Back" |
917 | msgstr "" |
918 | |
919 | -#: ../app/ui/EpisodesPage.qml:113 |
920 | -msgid "Search Episode..." |
921 | +#: ../app/ui/EpisodesPage.qml:131 |
922 | +msgid "Search episode" |
923 | msgstr "" |
924 | |
925 | -#: ../app/ui/EpisodesPage.qml:132 |
926 | +#: ../app/ui/EpisodesPage.qml:150 |
927 | msgid "Unsubscribe Confirmation" |
928 | msgstr "" |
929 | |
930 | -#: ../app/ui/EpisodesPage.qml:133 |
931 | +#: ../app/ui/EpisodesPage.qml:151 |
932 | #, qt-format |
933 | msgid "Are you sure you want to unsubscribe from <b>%1</b>?" |
934 | msgstr "" |
935 | |
936 | -#: ../app/ui/EpisodesPage.qml:135 |
937 | -msgid "Yes" |
938 | -msgstr "" |
939 | - |
940 | -#: ../app/ui/EpisodesPage.qml:152 |
941 | -msgid "No" |
942 | -msgstr "" |
943 | - |
944 | -#: ../app/ui/EpisodesPage.qml:166 |
945 | +#: ../app/ui/EpisodesPage.qml:170 |
946 | +msgid "Cancel" |
947 | +msgstr "" |
948 | + |
949 | +#: ../app/ui/EpisodesPage.qml:184 |
950 | msgid "No Episodes found" |
951 | msgstr "" |
952 | |
953 | -#: ../app/ui/EpisodesPage.qml:167 |
954 | +#: ../app/ui/EpisodesPage.qml:185 |
955 | msgid "No episodes found matching the search term." |
956 | msgstr "" |
957 | |
958 | -#: ../app/ui/EpisodesPage.qml:295 |
959 | +#: ../app/ui/EpisodesPage.qml:319 |
960 | #, no-c-format, qt-format |
961 | msgid "%1h %2m" |
962 | msgstr "" |
963 | |
964 | -#: ../app/ui/EpisodesPage.qml:304 |
965 | +#: ../app/ui/EpisodesPage.qml:328 |
966 | #, no-c-format, qt-format |
967 | msgid "%1h" |
968 | msgstr "" |
969 | |
970 | -#: ../app/ui/EpisodesPage.qml:312 |
971 | +#: ../app/ui/EpisodesPage.qml:336 |
972 | #, no-c-format, qt-format |
973 | msgid "%1m" |
974 | msgstr "" |
975 | @@ -83,11 +79,11 @@ |
976 | msgid "Now Playing" |
977 | msgstr "" |
978 | |
979 | -#: ../app/ui/NowPlayingPage.qml:140 |
980 | +#: ../app/ui/NowPlayingPage.qml:145 |
981 | msgid "-15s" |
982 | msgstr "" |
983 | |
984 | -#: ../app/ui/NowPlayingPage.qml:195 |
985 | +#: ../app/ui/NowPlayingPage.qml:204 |
986 | msgid "+15s" |
987 | msgstr "" |
988 | |
989 | @@ -104,7 +100,7 @@ |
990 | msgstr "" |
991 | |
992 | #: ../app/ui/PodcastsTab.qml:97 |
993 | -msgid "Search Podcast..." |
994 | +msgid "Search podcast" |
995 | msgstr "" |
996 | |
997 | #: ../app/ui/PodcastsTab.qml:120 |
998 | @@ -112,7 +108,7 @@ |
999 | msgstr "" |
1000 | |
1001 | #: ../app/ui/PodcastsTab.qml:133 |
1002 | -msgid "Feed URL..." |
1003 | +msgid "Feed URL" |
1004 | msgstr "" |
1005 | |
1006 | #: ../app/ui/PodcastsTab.qml:157 |
1007 | @@ -127,25 +123,25 @@ |
1008 | msgid "Close" |
1009 | msgstr "" |
1010 | |
1011 | -#: ../app/ui/PodcastsTab.qml:171 |
1012 | +#: ../app/ui/PodcastsTab.qml:172 |
1013 | msgid "No Podcast Subscriptions" |
1014 | msgstr "" |
1015 | |
1016 | -#: ../app/ui/PodcastsTab.qml:172 |
1017 | +#: ../app/ui/PodcastsTab.qml:173 |
1018 | msgid "No Podcasts Found" |
1019 | msgstr "" |
1020 | |
1021 | -#: ../app/ui/PodcastsTab.qml:173 |
1022 | +#: ../app/ui/PodcastsTab.qml:174 |
1023 | msgid "" |
1024 | "You haven't subscribed to any podcasts yet, visit the 'Find New Podcasts' " |
1025 | "page to add some." |
1026 | msgstr "" |
1027 | |
1028 | -#: ../app/ui/PodcastsTab.qml:174 |
1029 | +#: ../app/ui/PodcastsTab.qml:175 |
1030 | msgid "No podcasts found matching the search term." |
1031 | msgstr "" |
1032 | |
1033 | -#: ../app/ui/PodcastsTab.qml:281 |
1034 | +#: ../app/ui/PodcastsTab.qml:291 |
1035 | #, qt-format |
1036 | msgid "%1 unheard episode" |
1037 | msgid_plural "%1 unheard episodes" |
1038 | @@ -160,10 +156,18 @@ |
1039 | msgid "Search..." |
1040 | msgstr "" |
1041 | |
1042 | -#: ../app/ui/SearchTab.qml:114 |
1043 | +#: ../app/ui/SearchTab.qml:121 |
1044 | msgid "Subscribe" |
1045 | msgstr "" |
1046 | |
1047 | -#: /home/krnekhelesh/Documents/Ubuntu-Projects/MP-Reviews/builddir/build-fix-translation-UbuntuSDK_for_armhf_GCC_ubuntu_sdk_14_10_utopic-Default/po/Podbird.desktop.in.h:1 |
1048 | +#: ../app/ui/SettingsTab.qml:26 |
1049 | +msgid "Settings" |
1050 | +msgstr "" |
1051 | + |
1052 | +#: ../app/ui/SettingsTab.qml:41 |
1053 | +msgid "Theme" |
1054 | +msgstr "" |
1055 | + |
1056 | +#: /home/krnekhelesh/Documents/Ubuntu-Projects/MP-Reviews/builddir/build-1-add-theming-support-UbuntuSDK_for_armhf_GCC_ubuntu_sdk_14_10_utopic-Default/po/Podbird.desktop.in.h:1 |
1057 | msgid "Podbird" |
1058 | msgstr "" |
Just had a cursory glance through the code so far, which looks good, but I don't think we can merge this until the licensing of the ThemeManager component is clear.