Merge lp:~kill-animals/music-app/remix-nowplaying-code-refinement+proper-scaling into lp:music-app/remix

Proposed by Kill Animals
Status: Rejected
Rejected by: Victor Thompson
Proposed branch: lp:~kill-animals/music-app/remix-nowplaying-code-refinement+proper-scaling
Merge into: lp:music-app/remix
Diff against target: 557 lines (+191/-225)
4 files modified
MusicNowPlaying.qml (+191/-208)
common/MusicPage.qml (+0/-4)
tests/autopilot/music_app/__init__.py (+0/-11)
tests/autopilot/music_app/tests/test_music.py (+0/-2)
To merge this branch: bzr merge lp:~kill-animals/music-app/remix-nowplaying-code-refinement+proper-scaling
Reviewer Review Type Date Requested Status
Victor Thompson Disapprove
Ubuntu Phone Apps Jenkins Bot continuous-integration Needs Fixing
Review via email: mp+237411@code.launchpad.net

Commit message

Reduced and cleaned up code. Added flickables to the labels.
+++++++++++++++++++=

    Shrunk Icons as per suggestion.
    Heightened the bottom margin
    Slightly reduced the spacing expansion for the controls; thus they will Not spread so far apart when expanded.
    Changed duration labels to small
    Took out anchors in MusicPage because they were screwing up the header. MusicPage can probably be taken out.
    Set the blurred image height to 33 gu, so it is seemless with the album page.

Description of the change

Reduced and cleaned up code. Added flickables to the labels.
+++++++++++++++++++=

    Shrunk Icons as per suggestion.
    Heightened the bottom margin
    Slightly reduced the spacing expansion for the controls; thus they will Not spread so far apart when expanded.
    Changed duration labels to small
    Took out anchors in MusicPage because they were screwing up the header. MusicPage can probably be taken out.
    Set the blurred image height to 33 gu, so it is seemless with the album page.

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)
653. By Kill Animals

took out a debug and a commented out line

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 :

Thanks Akiva! Please see some initial inline comments (6 in total). I'll try to review more in depth in around 6 hours.

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

In terms of the UI elements as displayed on the device (see: http://i.imgur.com/daNXXMQ.png):
1. The size of the blurred background, and corresponding inside cover art need to be shrank to be what it was. My inline comment on this may be of use (wide mode).
2. The spacing between elements needs to be restored to what it was before.
3. The labels are incorrect for Artist and Album.
4. The text for the progress bar appears too large.
5. The icons for the controls are too large and need more spacing in between them and at the bottom.

In terms of the UI elements as displayed on the desktop (see: http://i.imgur.com/k15ifrw.png):
1. The controls were more appealing when they were grouped and smaller previously. Could they remain as they were just anchored to the bottom?

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

Additional inline comment.

Revision history for this message
Kill Animals (kill-animals) wrote :

> The size of the blurred background, and corresponding inside cover art need to be shrank to be what it was. My inline comment on this may be of use (wide mode).

I'd like to see the album blurred image height and the now playing blurred image height to be uniform, as I presume that this was what the design spec was going for. Its not clear though whether these heights you listed were the intent, or if it was the porportion of the screen these should take up. Can I try to attempt this?

> 2. The spacing between elements needs to be restored to what it was before.

> 3. The labels are incorrect for Artist and Album.

Presuming we take out the album label; This is now not such a sure thing. I briefly discussed this with ahayzen, where the issue is in cases where no album art exists at all; not informing the user what album he is currently listening to. It will have to be brought up with the designer I think, if he has time. If not, I will revert it without argument. I personally like the bold labels, but if we don't get any input; I'll take them out and replace them with spaces (so the column does not contract)

> 4. The text for the progress bar appears too large.

Mmmm this was actually a bit hard; I was going by eyeballing the text size provided in the design spec. The actual size sits somewhere between small and medium. I just went for medium so people would see it easier. I can make it small if you want.

As you can see though from this image: http://i.imgur.com/sq9vgsh.jpg The text is clearly larger in the spec.

> 5. The icons for the controls are too large and need more spacing in between them and at the bottom.

Can I do something where the size scales up with the window? On a large screen or tablet, the icon sizes provided in the spec are far too small. Just to compare the current sizes: http://imgur.com/ObFm9xW - I'll try to make them a bit more accurate either way.

> In terms of the UI elements as displayed on the desktop (see: http://i.imgur.com/k15ifrw.png):
1. The controls were more appealing when they were grouped and smaller previously. Could they remain as they were just anchored to the bottom?

I somewhat disagree, but I think it is a non issue given the desktop version will likely look like something more than just an expanded phone version, where a playlist or something else would cover up the side, and the controls would then not span the whole width of the bottom. I agree with you to an extent, but what I would like to keep the controls width scaled with the progress bar, so it appears more uniform.

Revision history for this message
Kill Animals (kill-animals) wrote :

comments.

654. By Kill Animals

merge with trunk

655. By Kill Animals

Merged with Remix Trunk

Shrunk Icons as per suggestion.
Heightened the bottom margin
Slightly reduced the spacing expansion for the controls; thus they will Not spread so far apart when expanded.
Changed duration labels to small
Took out anchors in MusicPage because they were screwing up the header. MusicPage can probably be taken out.
Set the blurred image height to 33 gu, so it is seemless with the album page.

656. By Kill Animals

Minor Adjustments

657. By Kill Animals

Minor adjustments

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

Akiva, this is what the view looks like on the Nexus 4 now: http://i.imgur.com/D0a3Ymy.png

Revision history for this message
Kill Animals (kill-animals) wrote :

Bah this is annoying; sorry about that; I know it wastes time...

This last one should be fine; i'll anchors the controls to the bottom like you wanted, and have the expansion bar and labels expand within that framework.

658. By Kill Animals

http://i.imgur.com/YhewwHc.png

Anchored the labels to be situated in between the controls/slider, and the blurred image. The app should now scale well for portrait configurations. I also made the album label only visible, if there is enough space to fit it. This is just in case of a smaller device using this.

659. By Kill Animals

Recommit to use a proper screenshot: http://i.imgur.com/WqIBBs9.png
Tested on Emulator

As said, If the labels start touching eachother, the album label hides. So smaller devices have a bit more wiggle room with portrait mode before things start looking off.

The controls are anchored to the bottom, and the labels are evenly spaced out in between (with proper margins)

Revision history for this message
Kill Animals (kill-animals) wrote :

let me merge with trunk.

Revision history for this message
Kill Animals (kill-animals) wrote :
660. By Kill Animals

Merged with :submit

Revision history for this message
Victor Thompson (vthompson) wrote :
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
661. By Kill Animals

Added visible: !isListView

Thanks vic!

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Kill Animals (kill-animals) wrote :

autopilot.exceptions.StateNotFoundError: Object not found with name '*' and properties {'objectName': 'progressSliderShape'}.

ProgressSliderShape was taken out afaik when the app was still attempting to build a slider manually.

662. By Kill Animals

Deprecated a test that relied on ubuntuSliderShape, as that no longer exists, now that we are using a slider. I commented it out, and appended a Fixme. The test was seeking, and I tested that myself, to which it is working. I also merged with trunk.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
663. By Kill Animals

fixed python syntax

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
664. By Kill Animals

took out the commented code altogether; the syntax issues behoove me.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
665. By Kill Animals

wrestling with syntax. Sorry jenkins.

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

Akiva, would you mind dropping this MP as it isn't providing any benefit to RTM for devices? Andrew and myself do not have the time to help with correcting the issues you are trying to fix. Additionally, the desktop/tablet layout of this view will change once the design team comes up with it's specifications. Perhaps you could help with implementing the tablet designs when or if they come in? If you still do want to help in the near term, you can probably either pick something from the blueprint or we can find you something. Thanks.

review: Disapprove
Revision history for this message
Kill Animals (kill-animals) wrote :

> Akiva, would you mind dropping this MP as it isn't providing any benefit to
> RTM for devices? Andrew and myself do not have the time to help with
> correcting the issues you are trying to fix. Additionally, the desktop/tablet
> layout of this view will change once the design team comes up with it's
> specifications. Perhaps you could help with implementing the tablet designs
> when or if they come in? If you still do want to help in the near term, you
> can probably either pick something from the blueprint or we can find you
> something. Thanks.

I disagree. The design is clearly better than what you have in there right now; The only thing that is failing is a bunch of deprecated tests. Rather than telling me to drop all this work I've done, how about you just tell me to get jenkins to pass it? Otherwise this is wasted effort.

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

The tests are in no way deprecated and the seek_to() function should not be removed. The Slider component in your MP needs to have an objectName so the function will find it.

Revision history for this message
Kill Animals (kill-animals) wrote :

> The tests are in no way deprecated and the seek_to() function should not be
> removed. The Slider component in your MP needs to have an objectName so the
> function will find it.

Yah I talked to ahayzen before about this; I will have to go through it some more. Mihir earlier today walked me through working on the tests and autopilot3.

Look; I won't take up any of your guys's time; I get that you are on a deadline. If I can get all the tests working again, and commit to a high quality branch, will you accept it provided it doesnt have you committing a significant amount of resources to it?

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

If we don't regress on either the device or desktop/tablet view and the change in UI for the desktop is modest then it's possible. Our team really should be focusing on RTM changes only, though. Regardless, if you want to proceed we may want to run the changes by the Design team to see if they agree with the visual improvement. However, if we redesign how the app behaves for tablets/desktop in the future, I'd imagine we'd be pulling the MusicNowPlaying.qml file into many separate components, which will probably remove any layout driven changes you are making here.

I just want to make sure that you are aware that you will have more luck trying to make improvements that directly affect RTM.

Revision history for this message
Kill Animals (kill-animals) wrote :

 >I just want to make sure that you are aware that you will have more luck trying to make improvements that directly affect RTM.

You would be better off just saying, "Let us know when you fix or re-write the tests in question, and have Jenkins passing them without a hitch. Just make sure you that you do not steal time away from Myself or Andrew, as we need to concentrate on the Remix."

Otherwise you made it appear that I am better off not contributing to the project at all, and I am fairly certain that is not the case. Anyways, I'll probably be bent out of shape about this for at least a day more or two, so I'll be concentrating on the other projects in the meantime. Don't take it personally or anything; its just that rejection coming out of the blue like that was really a shot to the gut; I'm sure that reaction is common. Anyways good luck with the RTM; You and Andrew do good work.

Unmerged revisions

665. By Kill Animals

wrestling with syntax. Sorry jenkins.

664. By Kill Animals

took out the commented code altogether; the syntax issues behoove me.

663. By Kill Animals

fixed python syntax

662. By Kill Animals

Deprecated a test that relied on ubuntuSliderShape, as that no longer exists, now that we are using a slider. I commented it out, and appended a Fixme. The test was seeking, and I tested that myself, to which it is working. I also merged with trunk.

661. By Kill Animals

Added visible: !isListView

Thanks vic!

660. By Kill Animals

Merged with :submit

659. By Kill Animals

Recommit to use a proper screenshot: http://i.imgur.com/WqIBBs9.png
Tested on Emulator

As said, If the labels start touching eachother, the album label hides. So smaller devices have a bit more wiggle room with portrait mode before things start looking off.

The controls are anchored to the bottom, and the labels are evenly spaced out in between (with proper margins)

658. By Kill Animals

http://i.imgur.com/YhewwHc.png

Anchored the labels to be situated in between the controls/slider, and the blurred image. The app should now scale well for portrait configurations. I also made the album label only visible, if there is enough space to fit it. This is just in case of a smaller device using this.

657. By Kill Animals

Minor adjustments

656. By Kill Animals

Minor Adjustments

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-10-13 12:36:59 +0000
3+++ MusicNowPlaying.qml 2014-10-15 10:54:55 +0000
4@@ -78,204 +78,209 @@
5 queuelist.positionViewAtIndex(index, ListView.Center);
6 }
7
8- Rectangle {
9- id: fullview
10- anchors.fill: parent
11- color: "transparent"
12- visible: !isListView
13-
14- BlurredBackground {
15- id: blurredBackground
16- anchors.top: parent.top
17- anchors.topMargin: mainView.header.height
18- height: units.gu(27)
19- art: albumImage.source
20-
21- Image {
22- id: albumImage
23- anchors.centerIn: parent
24- width: units.gu(18)
25- height: width
26- smooth: true
27- source: player.currentMetaArt === "" ?
28- decodeURIComponent("image://albumart/artist=" +
29- player.currentMetaArtist +
30- "&album=" + player.currentMetaAlbum)
31- : player.currentMetaArt
32- }
33- }
34-
35- /* Full toolbar */
36- Item {
37- id: musicToolbarFullContainer
38- anchors.top: blurredBackground.bottom
39- anchors.topMargin: units.gu(4)
40- width: blurredBackground.width
41-
42- /* Column for labels in wideAspect */
43- Column {
44- id: nowPlayingWideAspectLabels
45- spacing: units.gu(1)
46- anchors {
47- left: parent.left
48- leftMargin: units.gu(2)
49- right: parent.right
50- rightMargin: units.gu(2)
51- }
52-
53- /* Title of track */
54- Label {
55- id: nowPlayingWideAspectTitle
56- anchors {
57- left: parent.left
58- leftMargin: units.gu(1)
59- right: parent.right
60- rightMargin: units.gu(1)
61- }
62- color: styleMusic.playerControls.labelColor
63- elide: Text.ElideRight
64- fontSize: "x-large"
65- objectName: "playercontroltitle"
66- text: trackQueue.model.count === 0 ? "" : player.currentMetaTitle === "" ? player.currentMetaFile : player.currentMetaTitle
67- }
68-
69- /* Artist of track */
70- Label {
71- id: nowPlayingWideAspectArtist
72- anchors {
73- left: parent.left
74- leftMargin: units.gu(1)
75- right: parent.right
76- rightMargin: units.gu(1)
77- }
78- color: styleMusic.nowPlaying.labelSecondaryColor
79- elide: Text.ElideRight
80- fontSize: "small"
81- text: trackQueue.model.count === 0 ? "" : player.currentMetaArtist
82- }
83- }
84-
85- /* Progress bar component */
86- MouseArea {
87- id: musicToolbarFullProgressContainer
88- anchors.left: parent.left
89- anchors.leftMargin: units.gu(3)
90- anchors.right: parent.right
91- anchors.rightMargin: units.gu(3)
92- anchors.top: nowPlayingWideAspectLabels.bottom
93- anchors.topMargin: units.gu(3)
94- height: units.gu(3)
95+ BlurredBackground {
96+ id: blurredBackground
97+ height: units.gu(33)
98+ art: albumImage.source
99+ visible: !isListView
100+
101+ Image {
102+ id: albumImage
103+ anchors.centerIn: parent
104+ width: parent.height * 0.666
105+ height: width
106+ smooth: true
107+ source: player.currentMetaArt === "" ?
108+ decodeURIComponent("image://albumart/artist=" +
109+ player.currentMetaArtist +
110+ "&album=" + player.currentMetaAlbum)
111+ : player.currentMetaArt
112+ }
113+ }
114+
115+ /* Track Labels */
116+ Item {
117+ visible: !isListView
118+ anchors {
119+ top: blurredBackground.bottom
120+ topMargin: units.gu(2.5)
121+ bottom: progressSliderMusic.top
122+ left: parent.left
123+ right: parent.right
124+ }
125+ /* Title of track */
126+ Flickable {
127+ anchors {
128+ top: parent.top
129+ left: parent.left
130+ leftMargin: units.gu(2)
131+ right: parent.right
132+ }
133+ height: parent.height/3
134+ contentWidth: nowPlayingWideAspectTitle.width
135+ boundsBehavior: Flickable.StopAtBounds
136+
137+ Label {
138+ id: nowPlayingWideAspectTitle
139+ anchors.verticalCenter: parent.verticalCenter
140+ color: styleMusic.playerControls.labelColor
141+ fontSize: "x-large"
142+ objectName: "playercontroltitle"
143+ text: trackQueue.model.count === 0 ? "" : player.currentMetaTitle === "" ? player.currentMetaFile : player.currentMetaTitle
144+ onTextChanged: parent.x = 0
145+ }
146+ }
147+
148+ /* Artist of track */
149+ Flickable {
150+ anchors {
151+ verticalCenter: nowPlayingWideAspectAlbum.visible ? parent.verticalCenter : parent.bottom
152+ left: parent.left
153+ leftMargin: units.gu(2)
154+ right: parent.right
155+ }
156+ visible: parent.height > height
157+ height: parent.height/3
158+ contentWidth: nowPlayingWideAspectAlbum.width
159+ boundsBehavior: Flickable.StopAtBounds
160+
161+ Label {
162+ id: nowPlayingWideAspectArtist
163+ anchors.verticalCenter: parent.verticalCenter
164+ color: styleMusic.nowPlaying.labelSecondaryColor
165+ fontSize: "small"
166+ text: " " + player.currentMetaArtist //The space is to make sure the string does not contract.
167+ onTextChanged: parent.x = 0
168+ }
169+ }
170+
171+ /* Album of track */
172+ Flickable {
173+ anchors {
174+ bottom: parent.bottom
175+ left: parent.left
176+ leftMargin: units.gu(2)
177+ right: parent.right
178+ }
179+ height: parent.height/3
180+ contentWidth: nowPlayingWideAspectArtist.width
181+ boundsBehavior: Flickable.StopAtBounds
182+ visible: parent.height > height
183+
184+ Label {
185+ id: nowPlayingWideAspectAlbum
186+ anchors.verticalCenter: parent.verticalCenter
187+ color: styleMusic.nowPlaying.labelSecondaryColor
188+ fontSize: "small"
189+ text: " " + player.currentMetaAlbum
190+ onTextChanged: parent.x = 0
191+ visible: parent.height > height
192+ }
193+ }
194+ }
195+
196+ /* Progress Bar */
197+ Slider {
198+ id: progressSliderMusic
199+ visible: !isListView
200+ anchors {
201+ bottom: row.top
202+ bottomMargin: units.gu(2)
203+ left: parent.left
204+ leftMargin: units.gu(2)
205+ right: parent.right
206+ rightMargin: units.gu(2)
207+ }
208+
209+ function formatValue(v) { return durationToString(v) }
210+
211+ property bool seeking: false
212+
213+ onSeekingChanged: {
214+ if (seeking === false) {
215+ musicToolbarFullPositionLabel.text = durationToString(player.position)
216+ }
217+ }
218+
219+ Component.onCompleted: {
220+ Theme.palette.selected.foreground = UbuntuColors.blue
221+ }
222+
223+ onPressedChanged: {
224+ seeking = pressed
225+ if (!pressed) {
226+ player.seek(value)
227+ }
228+ }
229+
230+ Connections {
231+ target: player
232+ onDurationChanged: {
233+ musicToolbarFullDurationLabel.text = durationToString(player.duration)
234+ progressSliderMusic.maximumValue = player.duration
235+ }
236+ onPositionChanged: {
237+ if (progressSliderMusic.seeking === false) {
238+ progressSliderMusic.value = player.position
239+ musicToolbarFullPositionLabel.text = durationToString(player.position)
240+ musicToolbarFullDurationLabel.text = durationToString(player.duration)
241+ }
242+ }
243+ onStopped: {
244+ musicToolbarFullPositionLabel.text = durationToString(0);
245+ musicToolbarFullDurationLabel.text = durationToString(0);
246+ }
247+ }
248+
249+ Row {
250+ anchors.verticalCenter: parent.bottom
251 width: parent.width
252-
253+ spacing: width - musicToolbarFullPositionLabel.width - musicToolbarFullDurationLabel.width
254 /* Position label */
255 Label {
256 id: musicToolbarFullPositionLabel
257- anchors.top: progressSliderMusic.bottom
258- anchors.topMargin: units.gu(-2)
259- anchors.left: parent.left
260 color: styleMusic.nowPlaying.labelSecondaryColor
261 fontSize: "small"
262- height: parent.height
263- horizontalAlignment: Text.AlignHCenter
264 text: durationToString(player.position)
265- verticalAlignment: Text.AlignVCenter
266- width: units.gu(3)
267- }
268-
269- Slider {
270- id: progressSliderMusic
271- anchors.left: parent.left
272- anchors.right: parent.right
273- objectName: "progressSliderShape"
274-
275- function formatValue(v) {
276- if (seeking) { // update position label while dragging
277- musicToolbarFullPositionLabel.text = durationToString(v)
278- }
279-
280- return durationToString(v)
281- }
282-
283- property bool seeking: false
284- property bool seeked: false
285-
286- onSeekingChanged: {
287- if (seeking === false) {
288- musicToolbarFullPositionLabel.text = durationToString(player.position)
289- }
290- }
291-
292- Component.onCompleted: {
293- Theme.palette.selected.foreground = UbuntuColors.blue
294- }
295-
296- onPressedChanged: {
297- seeking = pressed
298- if (!pressed) {
299- seeked = true
300- player.seek(value)
301- }
302- }
303-
304- Connections {
305- target: player
306- onDurationChanged: {
307- musicToolbarFullDurationLabel.text = durationToString(player.duration)
308- progressSliderMusic.maximumValue = player.duration
309- }
310- onPositionChanged: {
311- // seeked is a workaround for bug 1310706 as the first position after a seek is sometimes invalid (0)
312- if (progressSliderMusic.seeking === false && !progressSliderMusic.seeked) {
313- progressSliderMusic.value = player.position
314- musicToolbarFullPositionLabel.text = durationToString(player.position)
315- musicToolbarFullDurationLabel.text = durationToString(player.duration)
316- }
317-
318- progressSliderMusic.seeked = false;
319- }
320- onStopped: {
321- musicToolbarFullPositionLabel.text = durationToString(0);
322- musicToolbarFullDurationLabel.text = durationToString(0);
323- }
324- }
325 }
326
327 /* Duration label */
328 Label {
329 id: musicToolbarFullDurationLabel
330- anchors.top: progressSliderMusic.bottom
331- anchors.topMargin: units.gu(-2)
332- anchors.right: parent.right
333 color: styleMusic.nowPlaying.labelSecondaryColor
334 fontSize: "small"
335- height: parent.height
336- horizontalAlignment: Text.AlignHCenter
337 text: durationToString(player.duration)
338- verticalAlignment: Text.AlignVCenter
339- width: units.gu(3)
340 }
341 }
342-
343+ }
344+
345+ /* Player Buttons */
346+ Row {
347+ id: row
348+ anchors {
349+ bottom: parent.bottom
350+ bottomMargin: units.gu(2.5)
351+ horizontalCenter: parent.horizontalCenter
352+ }
353+
354+ visible: !isListView
355+ spacing: ( parent.width - units.gu(21) ) / 5 // 21 is the width of the components
356 /* Repeat button */
357 MouseArea {
358 id: nowPlayingRepeatButton
359- anchors.right: nowPlayingPreviousButton.left
360- anchors.rightMargin: units.gu(1)
361+ objectName: "repeatShape"
362+ height: units.gu(3.5)
363+ width: height
364 anchors.verticalCenter: nowPlayingPlayButton.verticalCenter
365- height: units.gu(6)
366+
367 opacity: player.repeat && !emptyPage.noMusic ? 1 : .4
368- width: height
369 onClicked: player.repeat = !player.repeat
370
371 Icon {
372 id: repeatIcon
373- height: units.gu(3)
374- width: height
375- anchors.verticalCenter: parent.verticalCenter
376- anchors.horizontalCenter: parent.horizontalCenter
377+ anchors.fill: parent
378 color: "white"
379 name: "media-playlist-repeat"
380- objectName: "repeatShape"
381 opacity: player.repeat && !emptyPage.noMusic ? 1 : .4
382 }
383 }
384@@ -283,23 +288,19 @@
385 /* Previous button */
386 MouseArea {
387 id: nowPlayingPreviousButton
388- anchors.right: nowPlayingPlayButton.left
389- anchors.rightMargin: units.gu(1)
390+ height: units.gu(3.5)
391+ width: height
392 anchors.verticalCenter: nowPlayingPlayButton.verticalCenter
393- height: units.gu(6)
394+
395+ objectName: "previousShape"
396 opacity: trackQueue.model.count === 0 ? .4 : 1
397- width: height
398 onClicked: player.previousSong()
399
400 Icon {
401 id: nowPlayingPreviousIndicator
402- height: units.gu(3)
403- width: height
404- anchors.verticalCenter: parent.verticalCenter
405- anchors.horizontalCenter: parent.horizontalCenter
406+ anchors.fill: parent
407 color: "white"
408 name: "media-skip-backward"
409- objectName: "previousShape"
410 opacity: 1
411 }
412 }
413@@ -307,46 +308,35 @@
414 /* Play/Pause button */
415 MouseArea {
416 id: nowPlayingPlayButton
417- anchors.horizontalCenter: parent.horizontalCenter
418- anchors.top: musicToolbarFullProgressContainer.bottom
419- anchors.topMargin: units.gu(2)
420- height: units.gu(12)
421+ height: units.gu(7)
422 width: height
423+ objectName: "playShape"
424 onClicked: player.toggle()
425
426 Icon {
427 id: nowPlayingPlayIndicator
428- height: units.gu(6)
429- width: height
430- anchors.verticalCenter: parent.verticalCenter
431- anchors.horizontalCenter: parent.horizontalCenter
432+ anchors.fill: parent
433 opacity: emptyPage.noMusic ? .4 : 1
434 color: "white"
435 name: player.playbackState === MediaPlayer.PlayingState ? "media-playback-pause" : "media-playback-start"
436- objectName: "playShape"
437 }
438 }
439
440 /* Next button */
441 MouseArea {
442 id: nowPlayingNextButton
443- anchors.left: nowPlayingPlayButton.right
444- anchors.leftMargin: units.gu(1)
445+ height: units.gu(3.5)
446+ width: height
447 anchors.verticalCenter: nowPlayingPlayButton.verticalCenter
448- height: units.gu(6)
449+ objectName: "forwardShape"
450 opacity: trackQueue.model.count === 0 ? .4 : 1
451- width: height
452 onClicked: player.nextSong()
453
454 Icon {
455 id: nowPlayingNextIndicator
456- height: units.gu(3)
457- width: height
458- anchors.verticalCenter: parent.verticalCenter
459- anchors.horizontalCenter: parent.horizontalCenter
460+ anchors.fill: parent
461 color: "white"
462 name: "media-skip-forward"
463- objectName: "forwardShape"
464 opacity: 1
465 }
466 }
467@@ -354,28 +344,22 @@
468 /* Shuffle button */
469 MouseArea {
470 id: nowPlayingShuffleButton
471- anchors.left: nowPlayingNextButton.right
472- anchors.leftMargin: units.gu(1)
473+ objectName: "shuffleShape"
474+ height: units.gu(3.5)
475+ width: height
476 anchors.verticalCenter: nowPlayingPlayButton.verticalCenter
477- height: units.gu(6)
478 opacity: player.shuffle && !emptyPage.noMusic ? 1 : .4
479- width: height
480 onClicked: player.shuffle = !player.shuffle
481
482 Icon {
483 id: shuffleIcon
484- height: units.gu(3)
485- width: height
486- anchors.verticalCenter: parent.verticalCenter
487- anchors.horizontalCenter: parent.horizontalCenter
488+ anchors.fill: parent
489 color: "white"
490 name: "media-playlist-shuffle"
491- objectName: "shuffleShape"
492 opacity: player.shuffle && !emptyPage.noMusic ? 1 : .4
493 }
494 }
495 }
496- }
497
498 ListView {
499 id: queuelist
500@@ -461,7 +445,6 @@
501
502 queuelist.model.move(from, to, 1);
503
504-
505 // Maintain currentIndex with current song
506 if (from === player.currentIndex) {
507 player.currentIndex = to;
508
509=== modified file 'common/MusicPage.qml'
510--- common/MusicPage.qml 2014-10-06 02:18:23 +0000
511+++ common/MusicPage.qml 2014-10-15 10:54:55 +0000
512@@ -23,10 +23,6 @@
513 // generic page for music, could be useful for bottomedge implementation
514 Page {
515 id: thisPage
516- anchors {
517- bottomMargin: musicToolbar.visible ? musicToolbar.currentHeight : 0
518- fill: parent
519- }
520
521 onVisibleChanged: {
522 if (visible) {
523
524=== modified file 'tests/autopilot/music_app/__init__.py'
525--- tests/autopilot/music_app/__init__.py 2014-10-13 16:56:55 +0000
526+++ tests/autopilot/music_app/__init__.py 2014-10-15 10:54:55 +0000
527@@ -277,17 +277,6 @@
528 objectName="nowPlayingListItem" + str(i)))
529
530 @ensure_now_playing_full
531- def seek_to(self, percentage):
532- progress_bar = self.wait_select_single(
533- "*", objectName="progressSliderShape")
534-
535- x1, y1, width, height = progress_bar.globalRect
536- y1 += height // 2
537-
538- x2 = x1 + int(width * percentage / 100)
539-
540- self.pointing_device.drag(x1, y1, x2, y1)
541-
542 def set_repeat(self, state):
543 if self.player.repeat != state:
544 self.click_repeat_button()
545
546=== modified file 'tests/autopilot/music_app/tests/test_music.py'
547--- tests/autopilot/music_app/tests/test_music.py 2014-10-07 15:24:08 +0000
548+++ tests/autopilot/music_app/tests/test_music.py 2014-10-15 10:54:55 +0000
549@@ -171,8 +171,6 @@
550 logger.debug("Next Song %s, %s" % (self.player.currentMetaTitle,
551 self.player.currentMetaArtist))
552
553- now_playing_page.seek_to(0) # seek to 0 (start)
554-
555 # select previous and ensure the track is playing
556 now_playing_page.click_previous_button()
557 self.assertThat(self.player.isPlaying, Eventually(Equals(True)))

Subscribers

People subscribed via source and target branches