diff --git a/data/qml/CoverFlip.qml b/data/qml/CoverFlip.qml index 6a2d359a6..875179b43 100644 --- a/data/qml/CoverFlip.qml +++ b/data/qml/CoverFlip.qml @@ -11,7 +11,7 @@ PathView { property int pathStartY: height // The size of the covers in the path - property int coverSize: 100 + property int coverSize: height property color backgroundColor: "black" @@ -30,8 +30,8 @@ PathView { delegate: Item { id: delegateItem - height: root.coverSize - width: root.coverSize + height: coverView.coverSize + width: coverView.coverSize scale: PathView.itemScale // itemBrightness: PathView.itemBrightness - ((coverView.itemHovered && !coverDelegate.containsMouse) ? .4 : 0) @@ -43,8 +43,8 @@ PathView { CoverImage { id: coverDelegate - height: root.coverSize - width: root.coverSize + height: coverView.coverSize + width: coverView.coverSize anchors { top: parent.top right: parent.right @@ -59,6 +59,7 @@ PathView { artworkId: model.coverID showPlayButton: true currentlyPlaying: isPlaying + smooth: true // itemBrightness: PathView.itemBrightness - ((coverView.itemHovered && !coverDelegate.containsMouse) ? .4 : 0) itemBrightness: coverDelegate.containsMouse ? 1 : parent.itemBrightness * (coverView.itemHovered ? .5 : 1) @@ -90,7 +91,7 @@ PathView { name: "hovered"; when: coverDelegate.containsMouse && !coverView.moving && index !== currentIndex PropertyChanges { target: delegateItem - width: root.coverSize * 2 + width: coverView.coverSize * 2 z: delegateItem._origZ } } @@ -113,19 +114,19 @@ PathView { PathAttribute { name: "itemOpacity"; value: 0 } PathAttribute { name: "itemBrightness"; value: 0 } - PathAttribute { name: "itemScale"; value: 2 } + PathAttribute { name: "itemScale"; value: 1.3 } PathLine { x: coverView.width / 4; y: coverView.height / 4 * 3} PathPercent { value: 0.1 } PathAttribute { name: "itemOpacity"; value: 0 } PathAttribute { name: "itemBrightness"; value: 1 } - PathAttribute { name: "itemScale"; value: 1.5 } + PathAttribute { name: "itemScale"; value: 1.0 } PathLine { x: coverView.width / 2; y: coverView.height / 2} PathPercent { value: 0.2 } PathAttribute { name: "itemOpacity"; value: 1 } PathAttribute { name: "itemBrightness"; value: 1 } - PathAttribute { name: "itemScale"; value: 1 } + PathAttribute { name: "itemScale"; value: 0.5 } PathLine { x: coverView.width; y: 0 } PathPercent { value: 1 } diff --git a/data/qml/StationScene.qml b/data/qml/StationScene.qml index e04e3f7b7..7b937efa1 100644 --- a/data/qml/StationScene.qml +++ b/data/qml/StationScene.qml @@ -38,7 +38,6 @@ Rectangle { } StationView { - coverSize: Math.min(scene.height, scene.width) / 2 height: scene.height width: scene.width // visible: stationListView.currentIndex == 1 diff --git a/data/qml/StationView.qml b/data/qml/StationView.qml index 82d43b613..a25b4a38f 100644 --- a/data/qml/StationView.qml +++ b/data/qml/StationView.qml @@ -4,7 +4,6 @@ import "tomahawkimports" Item { id: root - property int coverSize signal backClicked() diff --git a/data/qml/tomahawkimports/CoverImage.qml b/data/qml/tomahawkimports/CoverImage.qml index fd8a9af7d..51946a4ab 100644 --- a/data/qml/tomahawkimports/CoverImage.qml +++ b/data/qml/tomahawkimports/CoverImage.qml @@ -32,6 +32,9 @@ Item { property double itemBrightness: 1 property double mirrorBrightness: .5 + // set this to true if you want to smoothly scale the cover (be aware of performance impacts) + property bool smooth: false + // will be emitted when the on hower play button is clicked signal playClicked() // will be emitted when the cover is clicked @@ -62,6 +65,7 @@ Item { anchors.fill: parent //anchors.margins: borderWidth source: "image://albumart/" + artworkId + smooth: root.smooth } Rectangle { @@ -171,10 +175,11 @@ Item { Image { id: playButton visible: showPlayButton ? (mouseArea.containsMouse || currentlyPlaying) : false - source: currentlyPlaying ? "../../images/pause-rest.png" : "../../images/play-rest.png" + source: currentlyPlaying ? "../../images/pause-rest.svg" : "../../images/play-rest.svg" anchors.centerIn: parent height: mirroredCover.height / 5 width: height + smooth: root.smooth MouseArea { anchors.fill: parent onClicked: {