ubuntu-touch-coreapps-reviewers team mailing list archive
-
ubuntu-touch-coreapps-reviewers team
-
Mailing list archive
-
Message #08964
[Merge] lp:~music-app-dev/music-app/fix-1550096-ota10-sdk-update into lp:music-app
Victor Thompson has proposed merging lp:~music-app-dev/music-app/fix-1550096-ota10-sdk-update into lp:music-app.
Commit message:
* Resolve issues related to SDK changes in OTA10
Requested reviews:
Music App Developers (music-app-dev)
Related bugs:
Bug #1550096 in Ubuntu Music App: "Potential music app updates needed due to a change in theming/UI toolkit in OTA10"
https://bugs.launchpad.net/music-app/+bug/1550096
For more details, see:
https://code.launchpad.net/~music-app-dev/music-app/fix-1550096-ota10-sdk-update/+merge/287363
* Resolve issues related to SDK changes in OTA10
See bug report for a working list of necessary changes.
--
Your team Music App Developers is requested to review the proposed merge of lp:~music-app-dev/music-app/fix-1550096-ota10-sdk-update into lp:music-app.
=== modified file 'app/components/HeadState/MultiSelectHeadState.qml'
--- app/components/HeadState/MultiSelectHeadState.qml 2016-01-16 01:30:31 +0000
+++ app/components/HeadState/MultiSelectHeadState.qml 2016-03-19 17:12:45 +0000
@@ -35,9 +35,9 @@
}
},
Action {
- enabled: listview !== null ? listview.getSelectedIndices().length > 0 : false
iconName: "add-to-playlist"
text: i18n.tr("Add to playlist")
+ visible: listview !== null ? listview.getSelectedIndices().length > 0 : false
onTriggered: {
var items = []
var indicies = listview.getSelectedIndices();
@@ -53,10 +53,9 @@
}
},
Action {
- enabled: listview !== null ? listview.getSelectedIndices().length > 0 : false
iconName: "add"
text: i18n.tr("Add to queue")
- visible: addToQueue
+ visible: listview !== null ? (listview.getSelectedIndices().length > 0) && addToQueue: false
onTriggered: {
var items = [];
@@ -72,10 +71,9 @@
}
},
Action {
- enabled: listview !== null ? listview.getSelectedIndices().length > 0 : false
iconName: "delete"
text: i18n.tr("Delete")
- visible: removable
+ visible: listview !== null ? (listview.getSelectedIndices().length > 0) && removable : false
onTriggered: {
removed(listview.getSelectedIndices())
=== modified file 'app/components/HeadState/PlaylistsHeadState.qml'
--- app/components/HeadState/PlaylistsHeadState.qml 2015-10-23 03:08:43 +0000
+++ app/components/HeadState/PlaylistsHeadState.qml 2016-03-19 17:12:45 +0000
@@ -41,7 +41,7 @@
}
]
- property alias newPlaylistEnabled: newPlaylistAction.enabled
- property alias searchEnabled: searchAction.enabled
+ property alias newPlaylistEnabled: newPlaylistAction.visible
+ property alias searchEnabled: searchAction.visible
property Page thisPage
}
=== modified file 'app/components/HeadState/SearchHeadState.qml'
--- app/components/HeadState/SearchHeadState.qml 2015-11-17 01:59:32 +0000
+++ app/components/HeadState/SearchHeadState.qml 2016-03-19 17:12:45 +0000
@@ -36,7 +36,6 @@
right: parent ? parent.right : undefined
rightMargin: units.gu(2)
}
- color: styleMusic.common.black
hasClearButton: true
inputMethodHints: Qt.ImhNoPredictiveText
placeholderText: i18n.tr("Search music")
=== modified file 'app/components/NowPlayingFullView.qml'
--- app/components/NowPlayingFullView.qml 2016-01-16 01:30:31 +0000
+++ app/components/NowPlayingFullView.qml 2016-03-19 17:12:45 +0000
@@ -187,7 +187,7 @@
anchors.right: parent.right
maximumValue: player.mediaPlayer.duration || 1 // fallback to 1 when 0 so that the progress bar works
objectName: "progressSliderShape"
- style: UbuntuBlueSliderStyle {}
+ style: SliderStyle {}
value: player.mediaPlayer.position // load value at startup
function formatValue(v) {
=== modified file 'app/components/Style.qml'
--- app/components/Style.qml 2015-08-12 23:36:44 +0000
+++ app/components/Style.qml 2016-03-19 17:12:45 +0000
@@ -48,8 +48,8 @@
property QtObject dialog: QtObject {
property color confirmButtonColor: UbuntuColors.green;
property color confirmRemoveButtonColor: UbuntuColors.red;
- property color cancelButtonColor: UbuntuColors.coolGrey;
- property color normalTextFieldColor: common.white
+ property color cancelButtonColor: UbuntuColors.jet;
+ property color normalTextFieldColor: common.white;
}
property QtObject libraryEmpty: QtObject {
=== modified file 'app/components/Themes/Ambiance/BubbleShape.qml'
--- app/components/Themes/Ambiance/BubbleShape.qml 2015-11-17 01:33:03 +0000
+++ app/components/Themes/Ambiance/BubbleShape.qml 2016-03-19 17:12:45 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 Canonical Ltd.
+ * Copyright 2016 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -28,15 +28,14 @@
/*!
The background color of the bubble.
*/
- property color color: square ? theme.palette.normal.background : theme.palette.normal.overlay
+ property color color: square
+ ? theme.palette.normal.background
+ : theme.palette.normal.overlay
property point target
property string direction: "down"
property bool clipContent: false
default property alias children: content.children
- // FIXME: This should not be necessary. See
- // https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1214978
- property alias arrowSource: arrow.source
implicitWidth: units.gu(10)
implicitHeight: units.gu(8)
@@ -111,7 +110,7 @@
UbuntuShape {
anchors.fill: parent
aspect: UbuntuShape.Flat
- backgroundColor: theme.palette.normal.overlay
+ backgroundColor: bubbleShape.color
source: bubbleShape.clipContent ? shapeSource : null
visible: !square
}
@@ -139,34 +138,4 @@
visible: bubbleShape.clipContent
}
}
-
- Item {
- x: target.x
- y: target.y
-
- Image {
- id: arrow
-
- visible: !square && bubbleShape.direction != "none"
-
- function directionToRotation(direction) {
- switch (direction) {
- case "up":
- return 180;
- case "left":
- return 90;
- case "right":
- return -90;
- default: // "down" or "none"
- return 0;
- }
- }
-
- x: -width / 2.0
- y: -height
- transformOrigin: Item.Bottom
- rotation: directionToRotation(bubbleShape.direction)
- source: Qt.resolvedUrl("../artwork/bubble_arrow.png")
- }
- }
}
=== added file 'app/components/Themes/Ambiance/SliderStyle.qml'
--- app/components/Themes/Ambiance/SliderStyle.qml 1970-01-01 00:00:00 +0000
+++ app/components/Themes/Ambiance/SliderStyle.qml 2016-03-19 17:12:45 +0000
@@ -0,0 +1,133 @@
+/*
+ * Copyright 2016 Canonical Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+import QtQuick 2.4
+import Ubuntu.Components 1.3
+
+/*
+ The default slider style consists of a bar and a thumb shape.
+
+ This style is themed using the following properties:
+ - thumbSpacing: spacing between the thumb and the bar
+*/
+Item {
+ id: sliderStyle
+
+ // CUSTOM: This was defined as UbuntuColors.blue
+ //property color foregroundColor: theme.palette.normal.activity
+ property color foregroundColor: UbuntuColors.blue
+ // CUSTOM: This was defined as UbuntuColors.ash (#888888)
+ //property color backgroundColor: theme.palette.normal.base
+ property color backgroundColor: "#888888"
+
+ property real thumbSpacing: units.gu(0)
+ property Item bar: background
+ property Item thumb: thumb
+
+ implicitWidth: units.gu(38)
+ implicitHeight: units.gu(5)
+
+ UbuntuShapeOverlay {
+ id: background
+ anchors {
+ verticalCenter: parent.verticalCenter
+ right: parent.right
+ left: parent.left
+ }
+ height: units.dp(2)
+ backgroundColor: sliderStyle.backgroundColor
+ aspect: UbuntuShape.Flat
+ overlayColor: sliderStyle.foregroundColor
+ overlayRect: Qt.application.layoutDirection == Qt.LeftToRight ?
+ Qt.rect(0.0, 0.0, thumb.x / thumb.barMinusThumbWidth, 1.0) :
+ Qt.rect(1.0 - (thumb.x / thumb.barMinusThumbWidth), 0.0, 1.0, 1.0)
+ }
+
+ UbuntuShape {
+ id: thumb
+
+ anchors {
+ verticalCenter: parent.verticalCenter
+ topMargin: thumbSpacing
+ bottomMargin: thumbSpacing
+ }
+
+ property real barMinusThumbWidth: background.width - (thumb.width + 2.0*thumbSpacing)
+ property real position: thumbSpacing + SliderUtils.normalizedValue(styledItem) * barMinusThumbWidth
+ property bool pressed: SliderUtils.isPressed(styledItem)
+ property bool positionReached: x == position
+ x: position
+
+ /* Enable the animation on x when pressing the slider.
+ Disable it when x has reached the target position.
+ */
+ onPressedChanged: if (pressed) xBehavior.enabled = true;
+ onPositionReachedChanged: if (positionReached) xBehavior.enabled = false;
+
+ Behavior on x {
+ id: xBehavior
+ SmoothedAnimation {
+ duration: UbuntuAnimation.FastDuration
+ }
+ }
+ width: units.gu(2)
+ height: units.gu(2)
+ // CUSTOM: This was defined as #FFFFFFolors.blue
+ //backgroundColor: theme.palette.normal.raised
+ backgroundColor: "#FFFFFF"
+
+ // CUSTOM: Commented out to avoid pulling in more dependencies
+ //FocusShape {
+ //}
+ }
+
+ BubbleShape {
+ id: bubbleShape
+
+ property real minimumWidth: units.gu(6)
+ property real horizontalPadding: units.gu(1)
+
+ width: label.implicitWidth + 2*horizontalPadding
+ height: label.implicitHeight + 2*horizontalPadding
+
+ // FIXME: very temporary implementation
+ property real minX: 0.0
+ property real maxX: background.width - width
+ property real pointerSize: units.dp(6)
+ property real targetMargin: units.gu(1)
+ property point globalTarget: Qt.point(thumb.x + thumb.width / 2.0, thumb.y - targetMargin)
+
+ x: MathUtils.clamp(globalTarget.x - width / 2.0, minX, maxX)
+ y: globalTarget.y - height - pointerSize
+ target: Qt.point(globalTarget.x - x, globalTarget.y - y)
+
+ property bool pressed: SliderUtils.isPressed(styledItem)
+ property bool shouldShow: pressed && label.text != ""
+ onShouldShowChanged: if (shouldShow) {
+ show();
+ } else {
+ hide();
+ }
+
+ Label {
+ id: label
+ anchors.centerIn: parent
+ text: styledItem.formatValue(SliderUtils.liveValue(styledItem))
+ textSize: Label.Medium
+ color: theme.palette.normal.overlayText
+ }
+ }
+}
=== removed file 'app/components/Themes/Ambiance/UbuntuBlueSliderStyle.qml'
--- app/components/Themes/Ambiance/UbuntuBlueSliderStyle.qml 2015-11-17 01:33:03 +0000
+++ app/components/Themes/Ambiance/UbuntuBlueSliderStyle.qml 1970-01-01 00:00:00 +0000
@@ -1,123 +0,0 @@
-/*
- * Copyright 2015 Canonical Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; version 3.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-import QtQuick 2.4
-import Ubuntu.Components 1.3
-
-/*
- The default slider style consists of a bar and a thumb shape.
-
- This style is themed using the following properties:
- - thumbSpacing: spacing between the thumb and the bar
-*/
-Item {
- id: sliderStyle
-
- property color foregroundColor: UbuntuColors.blue // CUSTOM
- property color backgroundColor: styleMusic.mainView.backgroundColor // CUSTOM
-
- property real thumbSpacing: units.gu(0)
- property Item bar: background
- property Item thumb: thumb
-
- implicitWidth: units.gu(38)
- implicitHeight: units.gu(5)
-
- UbuntuShapeOverlay {
- id: background
- anchors {
- verticalCenter: parent.verticalCenter
- right: parent.right
- left: parent.left
- }
- height: units.dp(4)
- backgroundColor: sliderStyle.backgroundColor
- overlayColor: sliderStyle.foregroundColor
- overlayRect: Qt.application.layoutDirection == Qt.LeftToRight ?
- Qt.rect(0.0, 0.0, thumb.x / thumb.barMinusThumbWidth, 1.0) :
- Qt.rect(1.0 - (thumb.x / thumb.barMinusThumbWidth), 0.0, 1.0, 1.0)
- }
-
- UbuntuShape {
- id: thumb
-
- anchors {
- verticalCenter: parent.verticalCenter
- topMargin: thumbSpacing
- bottomMargin: thumbSpacing
- }
-
- property real barMinusThumbWidth: background.width - (thumb.width + 2.0*thumbSpacing)
- property real position: thumbSpacing + SliderUtils.normalizedValue(styledItem) * barMinusThumbWidth
- property bool pressed: SliderUtils.isPressed(styledItem)
- property bool positionReached: x == position
- x: position
-
- /* Enable the animation on x when pressing the slider.
- Disable it when x has reached the target position.
- */
- onPressedChanged: if (pressed) xBehavior.enabled = true;
- onPositionReachedChanged: if (positionReached) xBehavior.enabled = false;
-
- Behavior on x {
- id: xBehavior
- SmoothedAnimation {
- duration: UbuntuAnimation.FastDuration
- }
- }
- width: units.gu(2)
- height: units.gu(2)
- opacity: 0.97
- backgroundColor: theme.palette.normal.overlay
- }
-
- BubbleShape {
- id: bubbleShape
-
- property real minimumWidth: units.gu(8)
- property real horizontalPadding: units.gu(1)
-
- width: Math.max(minimumWidth, label.implicitWidth + 2*horizontalPadding)
- height: units.gu(6)
-
- // FIXME: very temporary implementation
- property real minX: 0.0
- property real maxX: background.width - width
- property real pointerSize: units.dp(6)
- property real targetMargin: units.gu(1)
- property point globalTarget: Qt.point(thumb.x + thumb.width / 2.0, thumb.y - targetMargin)
-
- x: MathUtils.clamp(globalTarget.x - width / 2.0, minX, maxX)
- y: globalTarget.y - height - pointerSize
- target: Qt.point(globalTarget.x - x, globalTarget.y - y)
-
- property bool pressed: SliderUtils.isPressed(styledItem)
- property bool shouldShow: pressed && label.text != ""
- onShouldShowChanged: if (shouldShow) {
- show();
- } else {
- hide();
- }
-
- Label {
- id: label
- anchors.centerIn: parent
- text: styledItem.formatValue(SliderUtils.liveValue(styledItem))
- textSize: Label.Large
- color: theme.palette.normal.overlayText
- }
- }
-}
=== removed file 'app/components/Themes/artwork/bubble_shadow@xxxxxx'
Binary files app/components/Themes/artwork/bubble_shadow@xxxxxx 2014-11-21 00:17:32 +0000 and app/components/Themes/artwork/bubble_shadow@xxxxxx 1970-01-01 00:00:00 +0000 differ
=== removed file 'app/components/Themes/artwork/bubble_shadow@xxxxxx'
--- app/components/Themes/artwork/bubble_shadow@xxxxxx 2014-11-21 00:17:32 +0000
+++ app/components/Themes/artwork/bubble_shadow@xxxxxx 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-border.top: 21
-border.bottom: 26
-border.left: 27
-border.right: 27
-horizontalTileMode: BorderImage.Stretch
-verticalTileMode: BorderImage.Stretch
-source: bubble_shadow@xxxxxx
=== removed file 'app/components/Themes/artwork/bubble_shadow@xxxxxx'
Binary files app/components/Themes/artwork/bubble_shadow@xxxxxx 2014-11-21 00:17:32 +0000 and app/components/Themes/artwork/bubble_shadow@xxxxxx 1970-01-01 00:00:00 +0000 differ
=== removed file 'app/components/Themes/artwork/bubble_shadow@xxxxxx'
--- app/components/Themes/artwork/bubble_shadow@xxxxxx 2014-11-21 00:17:32 +0000
+++ app/components/Themes/artwork/bubble_shadow@xxxxxx 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-border.top: 31
-border.bottom: 37
-border.left: 38
-border.right: 38
-horizontalTileMode: BorderImage.Stretch
-verticalTileMode: BorderImage.Stretch
-source: bubble_shadow@xxxxxx
=== removed file 'app/components/Themes/artwork/bubble_shadow@xxxxx'
Binary files app/components/Themes/artwork/bubble_shadow@xxxxx 2014-11-21 00:17:32 +0000 and app/components/Themes/artwork/bubble_shadow@xxxxx 1970-01-01 00:00:00 +0000 differ
=== removed file 'app/components/Themes/artwork/bubble_shadow@xxxxx'
--- app/components/Themes/artwork/bubble_shadow@xxxxx 2014-11-21 00:17:32 +0000
+++ app/components/Themes/artwork/bubble_shadow@xxxxx 1970-01-01 00:00:00 +0000
@@ -1,7 +0,0 @@
-border.top: 10
-border.bottom: 11
-border.left: 12
-border.right: 11
-horizontalTileMode: BorderImage.Stretch
-verticalTileMode: BorderImage.Stretch
-source: bubble_shadow@xxxxx
=== modified file 'debian/changelog'
--- debian/changelog 2016-03-09 01:10:21 +0000
+++ debian/changelog 2016-03-19 17:12:45 +0000
@@ -9,6 +9,7 @@
* Fix regression where AddToPlaylist.qml no long supports plural track counts (LP: #1550832).
* Remove offset from the top of AddToPlaylist.qml (LP: #1538832).
* Fix topMargin of the Playlists empty state so title is not obscurred (LP: #1538829).
+ * Update a number of components to work properly with new color palette in the SDK (LP: #1550096).
[ Andrew Hayzen ]
* Fix so that a press and hold cannot disable selection in the ContentHubExport.qml (LP: #1538838)
Follow ups
-
[Merge] lp:~music-app-dev/music-app/fix-1550096-ota10-sdk-update into lp:music-app
From: noreply, 2016-03-23
-
[Merge] lp:~music-app-dev/music-app/fix-1550096-ota10-sdk-update into lp:music-app
From: Victor Thompson, 2016-03-23
-
Re: [Merge] lp:~music-app-dev/music-app/fix-1550096-ota10-sdk-update into lp:music-app
From: Jenkins Bot, 2016-03-23
-
Re: [Merge] lp:~music-app-dev/music-app/fix-1550096-ota10-sdk-update into lp:music-app
From: Jenkins Bot, 2016-03-23
-
Re: [Merge] lp:~music-app-dev/music-app/fix-1550096-ota10-sdk-update into lp:music-app
From: Jenkins Bot, 2016-03-23
-
[Merge] lp:~music-app-dev/music-app/fix-1550096-ota10-sdk-update into lp:music-app
From: Jenkins Bot, 2016-03-23
-
Re: [Merge] lp:~music-app-dev/music-app/fix-1550096-ota10-sdk-update into lp:music-app
From: Jenkins Bot, 2016-03-23
-
[Merge] lp:~music-app-dev/music-app/fix-1550096-ota10-sdk-update into lp:music-app
From: Andrew Hayzen, 2016-03-20
-
Re: [Merge] lp:~music-app-dev/music-app/fix-1550096-ota10-sdk-update into lp:music-app
From: Andrew Hayzen, 2016-03-20
-
Re: [Merge] lp:~music-app-dev/music-app/fix-1550096-ota10-sdk-update into lp:music-app
From: Victor Thompson, 2016-03-19