Merge lp:~ahayzen/music-app/remix-fix-listitemactions-highlight-reordering into lp:music-app/remix

Proposed by Andrew Hayzen
Status: Merged
Approved by: Victor Thompson
Approved revision: 743
Merged at revision: 743
Proposed branch: lp:~ahayzen/music-app/remix-fix-listitemactions-highlight-reordering
Merge into: lp:music-app/remix
Diff against target: 87 lines (+4/-13)
2 files modified
MusicNowPlaying.qml (+1/-1)
common/ListItemWithActions.qml (+3/-12)
To merge this branch: bzr merge lp:~ahayzen/music-app/remix-fix-listitemactions-highlight-reordering
Reviewer Review Type Date Requested Status
Victor Thompson Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+241879@code.launchpad.net

Commit message

* Fix for highlight in listitem with actons bleeding into the actions background
* Fix for reordering never being enabled

Description of the change

* Fix for highlight in listitem with actons bleeding into the actions background
* Fix for reordering never being enabled

To post a comment you must log in.
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
742. By Andrew Hayzen

* Remove reordering property as it isn't used anymore

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

Now that we are re-adding the reorder support. I'd like the items to have background color as they are reordered. I've never liked how it appears as though just the text is being moved. I think the following is the proper way to do this:

=== modified file 'MusicNowPlaying.qml'
--- MusicNowPlaying.qml 2014-11-07 22:51:16 +0000
+++ MusicNowPlaying.qml 2014-11-15 21:41:44 +0000
@@ -574,7 +574,7 @@
                 id: queueDelegate
                 ListItemWithActions {
                     id: queueListItem
- color: player.currentIndex === index ? "#2c2c34" : "transparent"
+ color: player.currentIndex === index ? "#2c2c34" : mainView.backgroundColor
                     height: queueList.normalHeight
                     objectName: "nowPlayingListItem" + index
                     state: ""

review: Needs Fixing
743. By Andrew Hayzen

* Fix so that now playing not current tracks have background when reordering

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

Fixed, please retest :)

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

LGTM!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'MusicNowPlaying.qml'
2--- MusicNowPlaying.qml 2014-11-07 22:51:16 +0000
3+++ MusicNowPlaying.qml 2014-11-15 22:22:02 +0000
4@@ -574,7 +574,7 @@
5 id: queueDelegate
6 ListItemWithActions {
7 id: queueListItem
8- color: player.currentIndex === index ? "#2c2c34" : "transparent"
9+ color: player.currentIndex === index ? "#2c2c34" : mainView.backgroundColor
10 height: queueList.normalHeight
11 objectName: "nowPlayingListItem" + index
12 state: ""
13
14=== modified file 'common/ListItemWithActions.qml'
15--- common/ListItemWithActions.qml 2014-11-08 00:17:21 +0000
16+++ common/ListItemWithActions.qml 2014-11-15 22:22:02 +0000
17@@ -46,7 +46,6 @@
18 readonly property bool _showActions: mouseArea.pressed || swipeState != "Normal" || swipping
19
20 property bool reorderable: false // CUSTOM
21- property bool reordering: false // CUSTOM
22 property bool multiselectable: false // CUSTOM
23
24 property int previousListItemIndex: -1 // CUSTOM
25@@ -61,7 +60,6 @@
26 signal reorder(int from, int to) // CUSTOM
27
28 onItemPressAndHold: {
29- //reordering = reorderable && !reordering // CUSTOM
30 if (multiselectable) {
31 selectionMode = true
32 }
33@@ -265,11 +263,6 @@
34 onClearSelection: selected = false
35 onSelectAll: selected = true
36 onStateChanged: selectionMode = root.parent.parent.state === "multiselectable"
37- onVisibleChanged: {
38- if (!visible) {
39- reordering = false
40- }
41- }
42 }
43
44 Component.onCompleted: { // CUSTOM
45@@ -365,7 +358,6 @@
46 anchors {
47 top: main.top
48 left: main.right
49- leftMargin: reordering ? actionReorder.width : 0 // CUSTOM
50 bottom: main.bottom
51 }
52 visible: _visibleRightSideActions.length > 0
53@@ -481,7 +473,7 @@
54 Rectangle {
55 id: listItemBrighten
56 anchors {
57- fill: parent
58+ fill: main
59 }
60
61 color: mouseArea.pressed ? styleMusic.common.white : "transparent"
62@@ -498,7 +490,7 @@
63 top: parent.top
64 }
65 asynchronous: true
66- sourceComponent: reordering ? actionReorderComponent : undefined
67+ sourceComponent: reorderable && selectionMode && root.parent.parent.selectedItems.length === 0 ? actionReorderComponent : undefined
68 }
69
70 Component {
71@@ -589,7 +581,6 @@
72 }
73 }
74
75-
76 SequentialAnimation {
77 id: triggerAction
78
79@@ -643,7 +634,7 @@
80 MouseArea {
81 id: mouseArea
82
83- property bool locked: root.locked || ((root.leftSideAction === null) && (root._visibleRightSideActions.count === 0)) || reordering // CUSTOM
84+ property bool locked: root.locked || ((root.leftSideAction === null) && (root._visibleRightSideActions.count === 0)) // CUSTOM
85 property bool manual: false
86 property string direction: "None"
87 property real lastX: -1

Subscribers

People subscribed via source and target branches