793
// draws the outer shadow/highlight
795
id: disabledSourceOutter
796
anchors { fill: parent; margins: -units.gu(0.1) }
800
GradientStop { position: 0.0; color: "black" }
801
GradientStop { position: 0.5; color: "transparent" }
802
GradientStop { position: 1.0; color: UbuntuColors.warmGrey }
806
anchors.verticalCenter: parent.verticalCenter
807
anchors.horizontalCenter: parent.horizontalCenter
810
height: playerControlsPlayButton.height - units.gu(.1)
815
id: disabledPlayerControlsPlayInnerCircle
816
anchors.horizontalCenter: parent.horizontalCenter
817
anchors.verticalCenter: parent.verticalCenter
819
height: units.gu(4.5)
822
color: styleMusic.toolbar.fullInnerPlayCircleColor
824
// draws the inner shadow/highlight
826
id: disabledSourceInner
827
anchors { fill: parent; margins: -units.gu(0.1) }
831
GradientStop { position: 0.0; color: UbuntuColors.warmGrey }
832
GradientStop { position: 0.5; color: "transparent" }
833
GradientStop { position: 1.0; color: "black" }
837
anchors.verticalCenter: parent.verticalCenter
838
anchors.horizontalCenter: parent.horizontalCenter
840
height: playerControlsPlayInnerCircle.height - units.gu(.1)
843
color: styleMusic.toolbar.fullInnerPlayCircleColor
846
id: disabledPlayIndicator
849
anchors.horizontalCenter: parent.horizontalCenter
850
anchors.verticalCenter: parent.verticalCenter
851
opacity: emptyPage.noMusic ? .4 : 1
852
source: player.playbackState === MediaPlayer.PlayingState ?
853
Qt.resolvedUrl("images/media-playback-pause.svg") : Qt.resolvedUrl("images/media-playback-start.svg")
864
810
id: enabledPlayerControlsGroup
866
814
color: "transparent"
867
visible: trackQueue.model.count !== 0
869
/* Settings button */
870
// TODO: Enable settings when it is practical
872
id: playerControlsSettings
873
anchors.right: parent.right
874
anchors.verticalCenter: parent.verticalCenter
880
anchors.horizontalCenter: parent.horizontalCenter
881
anchors.verticalCenter: parent.verticalCenter
883
source: Qt.resolvedUrl("images/settings.png")
890
console.debug('Debug: Show settings')
891
PopupUtils.open(Qt.resolvedUrl("MusicSettings.qml"), mainView,
893
title: i18n.tr("Settings")
899
/* Play/Pause button TODO: image and colours needs updating */
901
id: playerControlsPlayButton
902
anchors.right: parent.right
903
anchors.rightMargin: units.gu(1)
904
anchors.verticalCenter: parent.verticalCenter
908
objectName: "smallPlayShape"
913
if (emptyPage.noMusic) {
917
if (trackQueue.model.count === 0) {
925
// draws the outer shadow/highlight
928
anchors { fill: parent; margins: -units.gu(0.1) }
932
GradientStop { position: 0.0; color: "black" }
933
GradientStop { position: 0.5; color: "transparent" }
934
GradientStop { position: 1.0; color: UbuntuColors.warmGrey }
938
anchors.verticalCenter: parent.verticalCenter
939
anchors.horizontalCenter: parent.horizontalCenter
942
height: playerControlsPlayButton.height - units.gu(.1)
947
id: playerControlsPlayInnerCircle
948
anchors.horizontalCenter: parent.horizontalCenter
949
anchors.verticalCenter: parent.verticalCenter
951
height: units.gu(4.5)
954
color: styleMusic.toolbar.fullInnerPlayCircleColor
956
// draws the inner shadow/highlight
959
anchors { fill: parent; margins: -units.gu(0.1) }
963
GradientStop { position: 0.0; color: UbuntuColors.warmGrey }
964
GradientStop { position: 0.5; color: "transparent" }
965
GradientStop { position: 1.0; color: "black" }
969
anchors.verticalCenter: parent.verticalCenter
970
anchors.horizontalCenter: parent.horizontalCenter
972
height: playerControlsPlayInnerCircle.height - units.gu(.1)
975
color: styleMusic.toolbar.fullInnerPlayCircleColor
981
anchors.horizontalCenter: parent.horizontalCenter
982
anchors.verticalCenter: parent.verticalCenter
983
opacity: emptyPage.noMusic ? .4 : 1
984
source: player.playbackState === MediaPlayer.PlayingState ?
985
Qt.resolvedUrl("images/media-playback-pause.svg") : Qt.resolvedUrl("images/media-playback-start.svg")
816
/* Album art in player controls */
818
id: playerControlsImage
820
bottom: parent.bottom
825
source: player.currentMetaArt === "" ?
826
decodeURIComponent("image://albumart/artist=" +
827
player.currentMetaArtist +
828
"&album=" + player.currentMetaAlbum)
829
: player.currentMetaArt
833
if (status === Image.Error) {
834
source = Qt.resolvedUrl("../images/music-app-cover@30.png")
994
/* Container holding the labels for the toolbar */
996
id: playerControlLabelContainer
997
anchors.bottom: parent.bottom
998
anchors.left: parent.left
999
anchors.right: playerControlsPlayButton.left
1000
anchors.top: parent.top
1001
color: "transparent"
839
/* Column of meta labels */
841
id: playerControlsLabels
843
left: playerControlsImage.right
844
leftMargin: units.gu(1.5)
845
right: playerControlsPlayButton.left
846
rightMargin: units.gu(1)
847
verticalCenter: parent.verticalCenter
1003
850
/* Title of track */
1005
852
id: playerControlsTitle
1006
anchors.left: parent.left
1007
anchors.leftMargin: units.gu(1)
1008
anchors.right: parent.right
1009
anchors.rightMargin: units.gu(1)
1010
anchors.top: parent.top
1011
anchors.topMargin: units.gu(1)
1012
color: styleMusic.playerControls.labelColor
1013
858
elide: Text.ElideRight
1015
objectName: "playercontroltitle"
860
font.weight: Font.DemiBold
1016
861
text: player.currentMetaTitle === ""
1017
862
? player.source : player.currentMetaTitle
1020
865
/* Artist of track */
1022
867
id: playerControlsArtist
1023
anchors.left: parent.left
1024
anchors.leftMargin: units.gu(1)
1025
anchors.right: parent.right
1026
anchors.rightMargin: units.gu(1)
1027
anchors.top: playerControlsTitle.bottom
1028
color: styleMusic.playerControls.labelColor
1029
873
elide: Text.ElideRight
1030
874
fontSize: "small"
1031
876
text: player.currentMetaArtist
1034
/* Album of track */
1036
id: playerControlsAlbum
1037
anchors.left: parent.left
1038
anchors.leftMargin: units.gu(1)
1039
anchors.right: parent.right
1040
anchors.rightMargin: units.gu(1)
1041
anchors.top: playerControlsArtist.bottom
1042
color: styleMusic.playerControls.labelColor
1043
elide: Text.ElideRight
1045
text: player.currentMetaAlbum
880
/* Play/Pause button */
882
id: playerControlsPlayButton
885
rightMargin: units.gu(3)
886
verticalCenter: parent.verticalCenter
889
height: units.gu(2.5)
890
name: player.playbackState === MediaPlayer.PlayingState ?
891
"media-playback-pause" : "media-playback-start"
892
objectName: "smallPlayShape"
898
bottom: parent.bottom
899
horizontalCenter: playerControlsPlayButton.horizontalCenter
902
onClicked: player.toggle()
910
opacity: parent.pressed ? 0.1 : 0
912
Behavior on opacity {
913
UbuntuNumberAnimation {
914
duration: UbuntuAnimation.FastDuration
920
/* Mouse area to jump to now playing */
1050
anchors.fill: playerControlLabelContainer
923
bottom: parent.bottom
925
right: playerControlsLabels.right
1051
928
color: "transparent"
1052
929
function trigger() {
1053
930
tabs.pushNowPlaying();