Merge lp:~music-app-dev/music-app/fix-1550096-ota10-sdk-update into lp:music-app

Proposed by Victor Thompson
Status: Merged
Approved by: Victor Thompson
Approved revision: 986
Merged at revision: 996
Proposed branch: lp:~music-app-dev/music-app/fix-1550096-ota10-sdk-update
Merge into: lp:music-app
Diff against target: 486 lines (+147/-191)
12 files modified
app/components/HeadState/MultiSelectHeadState.qml (+3/-5)
app/components/HeadState/PlaylistsHeadState.qml (+2/-2)
app/components/HeadState/SearchHeadState.qml (+0/-1)
app/components/NowPlayingFullView.qml (+1/-1)
app/components/Style.qml (+2/-2)
app/components/Themes/Ambiance/BubbleShape.qml (+5/-36)
app/components/Themes/Ambiance/SliderStyle.qml (+133/-0)
app/components/Themes/Ambiance/UbuntuBlueSliderStyle.qml (+0/-123)
app/components/Themes/artwork/bubble_shadow@20.sci (+0/-7)
app/components/Themes/artwork/bubble_shadow@30.sci (+0/-7)
app/components/Themes/artwork/bubble_shadow@8.sci (+0/-7)
debian/changelog (+1/-0)
To merge this branch: bzr merge lp:~music-app-dev/music-app/fix-1550096-ota10-sdk-update
Reviewer Review Type Date Requested Status
Jenkins Bot continuous-integration Approve
Andrew Hayzen Approve
Review via email: mp+287363@code.launchpad.net

Commit message

* Resolve issues related to SDK changes in OTA10

Description of the change

* Resolve issues related to SDK changes in OTA10

See bug report for a working list of necessary changes.

To post a comment you must log in.
Revision history for this message
Victor Thompson (vthompson) wrote :

I should have done a "bzr mv" for the SliderStyle change. It is verbatim the same as the silo, save the CUSTOM tags added.

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

What still needs doing to make this non-WIP ?

Revision history for this message
Victor Thompson (vthompson) wrote :

Items #4 and #6 still need to be fixed. Item #6 could be argued as fine as-is, however (maybe it's the way it is per design).

4. Disabled header actions are not greyed out.
6. The leadingActions for Remove are no longer red with a white icon.

Revision history for this message
Victor Thompson (vthompson) wrote :

I fixed #4 by making the icons invisible when not enabled. This matched the behavior in the Contacts app. I also added and fixed another issue (#7) with the Dialog views.

This should be ready for review. We can file another bug/issue for #6 if it is seen as an issue.

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Functional:
1) Fixed
2) Fixed
3) Fixed
4) Fixed - Feels a bit weird having them show/hide wonder if we should check if we can dim (I don't like context aware items show/hiding as they are as discoverable so to find the multiselect actions you have to press and hold, then tick something to find out what you can do with it :-/ )
5) This has been fixed in bug 1554897, which I have tested the branch and I think is in silo050 now?
6) The icon colours is red, I sortof like it not sure. But we should check with design if this is expected.
7) Fixed

I think we should land even with the comments for #4, #6 but maybe keep the bug open and add ubuntu-ux ? So we can have a future branch, as landing this will make it easier to spot any other issues.

review: Approve
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) :
review: Approve (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :

FAILED: Autolanding.
Merging failed. More details in the following jenkins job:
https://core-apps-jenkins.ubuntu.com/job/music-app-autolanding/94/
Executed test runs:
    None: https://core-apps-jenkins.ubuntu.com/job/generic-land-mp/5691/console

review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
986. By Victor Thompson

merge of trunk and resolve conflict

Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'app/components/HeadState/MultiSelectHeadState.qml'
2--- app/components/HeadState/MultiSelectHeadState.qml 2016-01-16 01:30:31 +0000
3+++ app/components/HeadState/MultiSelectHeadState.qml 2016-03-23 02:12:45 +0000
4@@ -35,9 +35,9 @@
5 }
6 },
7 Action {
8- enabled: listview !== null ? listview.getSelectedIndices().length > 0 : false
9 iconName: "add-to-playlist"
10 text: i18n.tr("Add to playlist")
11+ visible: listview !== null ? listview.getSelectedIndices().length > 0 : false
12 onTriggered: {
13 var items = []
14 var indicies = listview.getSelectedIndices();
15@@ -53,10 +53,9 @@
16 }
17 },
18 Action {
19- enabled: listview !== null ? listview.getSelectedIndices().length > 0 : false
20 iconName: "add"
21 text: i18n.tr("Add to queue")
22- visible: addToQueue
23+ visible: listview !== null ? (listview.getSelectedIndices().length > 0) && addToQueue: false
24
25 onTriggered: {
26 var items = [];
27@@ -72,10 +71,9 @@
28 }
29 },
30 Action {
31- enabled: listview !== null ? listview.getSelectedIndices().length > 0 : false
32 iconName: "delete"
33 text: i18n.tr("Delete")
34- visible: removable
35+ visible: listview !== null ? (listview.getSelectedIndices().length > 0) && removable : false
36
37 onTriggered: {
38 removed(listview.getSelectedIndices())
39
40=== modified file 'app/components/HeadState/PlaylistsHeadState.qml'
41--- app/components/HeadState/PlaylistsHeadState.qml 2015-10-23 03:08:43 +0000
42+++ app/components/HeadState/PlaylistsHeadState.qml 2016-03-23 02:12:45 +0000
43@@ -41,7 +41,7 @@
44 }
45 ]
46
47- property alias newPlaylistEnabled: newPlaylistAction.enabled
48- property alias searchEnabled: searchAction.enabled
49+ property alias newPlaylistEnabled: newPlaylistAction.visible
50+ property alias searchEnabled: searchAction.visible
51 property Page thisPage
52 }
53
54=== modified file 'app/components/HeadState/SearchHeadState.qml'
55--- app/components/HeadState/SearchHeadState.qml 2015-11-17 01:59:32 +0000
56+++ app/components/HeadState/SearchHeadState.qml 2016-03-23 02:12:45 +0000
57@@ -36,7 +36,6 @@
58 right: parent ? parent.right : undefined
59 rightMargin: units.gu(2)
60 }
61- color: styleMusic.common.black
62 hasClearButton: true
63 inputMethodHints: Qt.ImhNoPredictiveText
64 placeholderText: i18n.tr("Search music")
65
66=== modified file 'app/components/NowPlayingFullView.qml'
67--- app/components/NowPlayingFullView.qml 2016-01-16 01:30:31 +0000
68+++ app/components/NowPlayingFullView.qml 2016-03-23 02:12:45 +0000
69@@ -187,7 +187,7 @@
70 anchors.right: parent.right
71 maximumValue: player.mediaPlayer.duration || 1 // fallback to 1 when 0 so that the progress bar works
72 objectName: "progressSliderShape"
73- style: UbuntuBlueSliderStyle {}
74+ style: SliderStyle {}
75 value: player.mediaPlayer.position // load value at startup
76
77 function formatValue(v) {
78
79=== modified file 'app/components/Style.qml'
80--- app/components/Style.qml 2015-08-12 23:36:44 +0000
81+++ app/components/Style.qml 2016-03-23 02:12:45 +0000
82@@ -48,8 +48,8 @@
83 property QtObject dialog: QtObject {
84 property color confirmButtonColor: UbuntuColors.green;
85 property color confirmRemoveButtonColor: UbuntuColors.red;
86- property color cancelButtonColor: UbuntuColors.coolGrey;
87- property color normalTextFieldColor: common.white
88+ property color cancelButtonColor: UbuntuColors.jet;
89+ property color normalTextFieldColor: common.white;
90 }
91
92 property QtObject libraryEmpty: QtObject {
93
94=== modified file 'app/components/Themes/Ambiance/BubbleShape.qml'
95--- app/components/Themes/Ambiance/BubbleShape.qml 2015-11-17 01:33:03 +0000
96+++ app/components/Themes/Ambiance/BubbleShape.qml 2016-03-23 02:12:45 +0000
97@@ -1,5 +1,5 @@
98 /*
99- * Copyright 2015 Canonical Ltd.
100+ * Copyright 2016 Canonical Ltd.
101 *
102 * This program is free software; you can redistribute it and/or modify
103 * it under the terms of the GNU Lesser General Public License as published by
104@@ -28,15 +28,14 @@
105 /*!
106 The background color of the bubble.
107 */
108- property color color: square ? theme.palette.normal.background : theme.palette.normal.overlay
109+ property color color: square
110+ ? theme.palette.normal.background
111+ : theme.palette.normal.overlay
112
113 property point target
114 property string direction: "down"
115 property bool clipContent: false
116 default property alias children: content.children
117- // FIXME: This should not be necessary. See
118- // https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1214978
119- property alias arrowSource: arrow.source
120
121 implicitWidth: units.gu(10)
122 implicitHeight: units.gu(8)
123@@ -111,7 +110,7 @@
124 UbuntuShape {
125 anchors.fill: parent
126 aspect: UbuntuShape.Flat
127- backgroundColor: theme.palette.normal.overlay
128+ backgroundColor: bubbleShape.color
129 source: bubbleShape.clipContent ? shapeSource : null
130 visible: !square
131 }
132@@ -139,34 +138,4 @@
133 visible: bubbleShape.clipContent
134 }
135 }
136-
137- Item {
138- x: target.x
139- y: target.y
140-
141- Image {
142- id: arrow
143-
144- visible: !square && bubbleShape.direction != "none"
145-
146- function directionToRotation(direction) {
147- switch (direction) {
148- case "up":
149- return 180;
150- case "left":
151- return 90;
152- case "right":
153- return -90;
154- default: // "down" or "none"
155- return 0;
156- }
157- }
158-
159- x: -width / 2.0
160- y: -height
161- transformOrigin: Item.Bottom
162- rotation: directionToRotation(bubbleShape.direction)
163- source: Qt.resolvedUrl("../artwork/bubble_arrow.png")
164- }
165- }
166 }
167
168=== added file 'app/components/Themes/Ambiance/SliderStyle.qml'
169--- app/components/Themes/Ambiance/SliderStyle.qml 1970-01-01 00:00:00 +0000
170+++ app/components/Themes/Ambiance/SliderStyle.qml 2016-03-23 02:12:45 +0000
171@@ -0,0 +1,133 @@
172+/*
173+ * Copyright 2016 Canonical Ltd.
174+ *
175+ * This program is free software; you can redistribute it and/or modify
176+ * it under the terms of the GNU Lesser General Public License as published by
177+ * the Free Software Foundation; version 3.
178+ *
179+ * This program is distributed in the hope that it will be useful,
180+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
181+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
182+ * GNU Lesser General Public License for more details.
183+ *
184+ * You should have received a copy of the GNU Lesser General Public License
185+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
186+ */
187+
188+import QtQuick 2.4
189+import Ubuntu.Components 1.3
190+
191+/*
192+ The default slider style consists of a bar and a thumb shape.
193+
194+ This style is themed using the following properties:
195+ - thumbSpacing: spacing between the thumb and the bar
196+*/
197+Item {
198+ id: sliderStyle
199+
200+ // CUSTOM: This was defined as UbuntuColors.blue
201+ //property color foregroundColor: theme.palette.normal.activity
202+ property color foregroundColor: UbuntuColors.blue
203+ // CUSTOM: This was defined as UbuntuColors.ash (#888888)
204+ //property color backgroundColor: theme.palette.normal.base
205+ property color backgroundColor: "#888888"
206+
207+ property real thumbSpacing: units.gu(0)
208+ property Item bar: background
209+ property Item thumb: thumb
210+
211+ implicitWidth: units.gu(38)
212+ implicitHeight: units.gu(5)
213+
214+ UbuntuShapeOverlay {
215+ id: background
216+ anchors {
217+ verticalCenter: parent.verticalCenter
218+ right: parent.right
219+ left: parent.left
220+ }
221+ height: units.dp(2)
222+ backgroundColor: sliderStyle.backgroundColor
223+ aspect: UbuntuShape.Flat
224+ overlayColor: sliderStyle.foregroundColor
225+ overlayRect: Qt.application.layoutDirection == Qt.LeftToRight ?
226+ Qt.rect(0.0, 0.0, thumb.x / thumb.barMinusThumbWidth, 1.0) :
227+ Qt.rect(1.0 - (thumb.x / thumb.barMinusThumbWidth), 0.0, 1.0, 1.0)
228+ }
229+
230+ UbuntuShape {
231+ id: thumb
232+
233+ anchors {
234+ verticalCenter: parent.verticalCenter
235+ topMargin: thumbSpacing
236+ bottomMargin: thumbSpacing
237+ }
238+
239+ property real barMinusThumbWidth: background.width - (thumb.width + 2.0*thumbSpacing)
240+ property real position: thumbSpacing + SliderUtils.normalizedValue(styledItem) * barMinusThumbWidth
241+ property bool pressed: SliderUtils.isPressed(styledItem)
242+ property bool positionReached: x == position
243+ x: position
244+
245+ /* Enable the animation on x when pressing the slider.
246+ Disable it when x has reached the target position.
247+ */
248+ onPressedChanged: if (pressed) xBehavior.enabled = true;
249+ onPositionReachedChanged: if (positionReached) xBehavior.enabled = false;
250+
251+ Behavior on x {
252+ id: xBehavior
253+ SmoothedAnimation {
254+ duration: UbuntuAnimation.FastDuration
255+ }
256+ }
257+ width: units.gu(2)
258+ height: units.gu(2)
259+ // CUSTOM: This was defined as #FFFFFFolors.blue
260+ //backgroundColor: theme.palette.normal.raised
261+ backgroundColor: "#FFFFFF"
262+
263+ // CUSTOM: Commented out to avoid pulling in more dependencies
264+ //FocusShape {
265+ //}
266+ }
267+
268+ BubbleShape {
269+ id: bubbleShape
270+
271+ property real minimumWidth: units.gu(6)
272+ property real horizontalPadding: units.gu(1)
273+
274+ width: label.implicitWidth + 2*horizontalPadding
275+ height: label.implicitHeight + 2*horizontalPadding
276+
277+ // FIXME: very temporary implementation
278+ property real minX: 0.0
279+ property real maxX: background.width - width
280+ property real pointerSize: units.dp(6)
281+ property real targetMargin: units.gu(1)
282+ property point globalTarget: Qt.point(thumb.x + thumb.width / 2.0, thumb.y - targetMargin)
283+
284+ x: MathUtils.clamp(globalTarget.x - width / 2.0, minX, maxX)
285+ y: globalTarget.y - height - pointerSize
286+ target: Qt.point(globalTarget.x - x, globalTarget.y - y)
287+
288+ property bool pressed: SliderUtils.isPressed(styledItem)
289+ property bool shouldShow: pressed && label.text != ""
290+ onShouldShowChanged: if (shouldShow) {
291+ show();
292+ } else {
293+ hide();
294+ }
295+
296+ Label {
297+ id: label
298+ anchors.centerIn: parent
299+ text: styledItem.formatValue(SliderUtils.liveValue(styledItem))
300+ textSize: Label.Medium
301+ color: theme.palette.normal.overlayText
302+ }
303+ }
304+}
305
306=== removed file 'app/components/Themes/Ambiance/UbuntuBlueSliderStyle.qml'
307--- app/components/Themes/Ambiance/UbuntuBlueSliderStyle.qml 2015-11-17 01:33:03 +0000
308+++ app/components/Themes/Ambiance/UbuntuBlueSliderStyle.qml 1970-01-01 00:00:00 +0000
309@@ -1,123 +0,0 @@
310-/*
311- * Copyright 2015 Canonical Ltd.
312- *
313- * This program is free software; you can redistribute it and/or modify
314- * it under the terms of the GNU Lesser General Public License as published by
315- * the Free Software Foundation; version 3.
316- *
317- * This program is distributed in the hope that it will be useful,
318- * but WITHOUT ANY WARRANTY; without even the implied warranty of
319- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
320- * GNU Lesser General Public License for more details.
321- *
322- * You should have received a copy of the GNU Lesser General Public License
323- * along with this program. If not, see <http://www.gnu.org/licenses/>.
324- */
325-
326-import QtQuick 2.4
327-import Ubuntu.Components 1.3
328-
329-/*
330- The default slider style consists of a bar and a thumb shape.
331-
332- This style is themed using the following properties:
333- - thumbSpacing: spacing between the thumb and the bar
334-*/
335-Item {
336- id: sliderStyle
337-
338- property color foregroundColor: UbuntuColors.blue // CUSTOM
339- property color backgroundColor: styleMusic.mainView.backgroundColor // CUSTOM
340-
341- property real thumbSpacing: units.gu(0)
342- property Item bar: background
343- property Item thumb: thumb
344-
345- implicitWidth: units.gu(38)
346- implicitHeight: units.gu(5)
347-
348- UbuntuShapeOverlay {
349- id: background
350- anchors {
351- verticalCenter: parent.verticalCenter
352- right: parent.right
353- left: parent.left
354- }
355- height: units.dp(4)
356- backgroundColor: sliderStyle.backgroundColor
357- overlayColor: sliderStyle.foregroundColor
358- overlayRect: Qt.application.layoutDirection == Qt.LeftToRight ?
359- Qt.rect(0.0, 0.0, thumb.x / thumb.barMinusThumbWidth, 1.0) :
360- Qt.rect(1.0 - (thumb.x / thumb.barMinusThumbWidth), 0.0, 1.0, 1.0)
361- }
362-
363- UbuntuShape {
364- id: thumb
365-
366- anchors {
367- verticalCenter: parent.verticalCenter
368- topMargin: thumbSpacing
369- bottomMargin: thumbSpacing
370- }
371-
372- property real barMinusThumbWidth: background.width - (thumb.width + 2.0*thumbSpacing)
373- property real position: thumbSpacing + SliderUtils.normalizedValue(styledItem) * barMinusThumbWidth
374- property bool pressed: SliderUtils.isPressed(styledItem)
375- property bool positionReached: x == position
376- x: position
377-
378- /* Enable the animation on x when pressing the slider.
379- Disable it when x has reached the target position.
380- */
381- onPressedChanged: if (pressed) xBehavior.enabled = true;
382- onPositionReachedChanged: if (positionReached) xBehavior.enabled = false;
383-
384- Behavior on x {
385- id: xBehavior
386- SmoothedAnimation {
387- duration: UbuntuAnimation.FastDuration
388- }
389- }
390- width: units.gu(2)
391- height: units.gu(2)
392- opacity: 0.97
393- backgroundColor: theme.palette.normal.overlay
394- }
395-
396- BubbleShape {
397- id: bubbleShape
398-
399- property real minimumWidth: units.gu(8)
400- property real horizontalPadding: units.gu(1)
401-
402- width: Math.max(minimumWidth, label.implicitWidth + 2*horizontalPadding)
403- height: units.gu(6)
404-
405- // FIXME: very temporary implementation
406- property real minX: 0.0
407- property real maxX: background.width - width
408- property real pointerSize: units.dp(6)
409- property real targetMargin: units.gu(1)
410- property point globalTarget: Qt.point(thumb.x + thumb.width / 2.0, thumb.y - targetMargin)
411-
412- x: MathUtils.clamp(globalTarget.x - width / 2.0, minX, maxX)
413- y: globalTarget.y - height - pointerSize
414- target: Qt.point(globalTarget.x - x, globalTarget.y - y)
415-
416- property bool pressed: SliderUtils.isPressed(styledItem)
417- property bool shouldShow: pressed && label.text != ""
418- onShouldShowChanged: if (shouldShow) {
419- show();
420- } else {
421- hide();
422- }
423-
424- Label {
425- id: label
426- anchors.centerIn: parent
427- text: styledItem.formatValue(SliderUtils.liveValue(styledItem))
428- textSize: Label.Large
429- color: theme.palette.normal.overlayText
430- }
431- }
432-}
433
434=== removed file 'app/components/Themes/artwork/bubble_shadow@20.png'
435Binary files app/components/Themes/artwork/bubble_shadow@20.png 2014-11-21 00:17:32 +0000 and app/components/Themes/artwork/bubble_shadow@20.png 1970-01-01 00:00:00 +0000 differ
436=== removed file 'app/components/Themes/artwork/bubble_shadow@20.sci'
437--- app/components/Themes/artwork/bubble_shadow@20.sci 2014-11-21 00:17:32 +0000
438+++ app/components/Themes/artwork/bubble_shadow@20.sci 1970-01-01 00:00:00 +0000
439@@ -1,7 +0,0 @@
440-border.top: 21
441-border.bottom: 26
442-border.left: 27
443-border.right: 27
444-horizontalTileMode: BorderImage.Stretch
445-verticalTileMode: BorderImage.Stretch
446-source: bubble_shadow@20.png
447
448=== removed file 'app/components/Themes/artwork/bubble_shadow@30.png'
449Binary files app/components/Themes/artwork/bubble_shadow@30.png 2014-11-21 00:17:32 +0000 and app/components/Themes/artwork/bubble_shadow@30.png 1970-01-01 00:00:00 +0000 differ
450=== removed file 'app/components/Themes/artwork/bubble_shadow@30.sci'
451--- app/components/Themes/artwork/bubble_shadow@30.sci 2014-11-21 00:17:32 +0000
452+++ app/components/Themes/artwork/bubble_shadow@30.sci 1970-01-01 00:00:00 +0000
453@@ -1,7 +0,0 @@
454-border.top: 31
455-border.bottom: 37
456-border.left: 38
457-border.right: 38
458-horizontalTileMode: BorderImage.Stretch
459-verticalTileMode: BorderImage.Stretch
460-source: bubble_shadow@30.png
461
462=== removed file 'app/components/Themes/artwork/bubble_shadow@8.png'
463Binary files app/components/Themes/artwork/bubble_shadow@8.png 2014-11-21 00:17:32 +0000 and app/components/Themes/artwork/bubble_shadow@8.png 1970-01-01 00:00:00 +0000 differ
464=== removed file 'app/components/Themes/artwork/bubble_shadow@8.sci'
465--- app/components/Themes/artwork/bubble_shadow@8.sci 2014-11-21 00:17:32 +0000
466+++ app/components/Themes/artwork/bubble_shadow@8.sci 1970-01-01 00:00:00 +0000
467@@ -1,7 +0,0 @@
468-border.top: 10
469-border.bottom: 11
470-border.left: 12
471-border.right: 11
472-horizontalTileMode: BorderImage.Stretch
473-verticalTileMode: BorderImage.Stretch
474-source: bubble_shadow@8.png
475
476=== modified file 'debian/changelog'
477--- debian/changelog 2016-03-23 01:47:37 +0000
478+++ debian/changelog 2016-03-23 02:12:45 +0000
479@@ -10,6 +10,7 @@
480 * Remove offset from the top of AddToPlaylist.qml (LP: #1538832).
481 * Fix topMargin of the Playlists empty state so title is not obscurred (LP: #1538829).
482 * Fix fallback art when the it is linked to the Player's currentMeta (LP: #1549557).
483+ * Update a number of components to work properly with new color palette in the SDK (LP: #1550096).
484
485 [ Andrew Hayzen ]
486 * Fix so that a press and hold cannot disable selection in the ContentHubExport.qml (LP: #1538838)

Subscribers

People subscribed via source and target branches

to all changes: