Commit 040a9e83 authored by kempe's avatar kempe

#11 Redesigned cover to show track information

parent 293c32d8
......@@ -53,7 +53,8 @@ DISTFILES += \
qml/pages/SettingsPage.qml \
qml/pages/StationsPageForm.ui.qml \
qml/pages/StationsPage.qml \
qml/harbour-received.qml
qml/harbour-received.qml \
qml/cover/layouts/CoverDesign.qml
OTHER_FILES += \
rpm/harbour-received.changes.in \
......
import QtQuick 2.6
import Sailfish.Silica 1.0
import it.kempe.AudioPlayer 1.0
import "./layouts"
CoverBackground {
Image {
source: window.stationIcon
anchors.top: parent.top
anchors.left: parent.left
width: parent.width
height: parent.width
opacity: 0.1
CoverDesign {
anchors.top: parent.top
anchors.right: parent.right
anchors.bottom: coverActionArea.top
anchors.left: parent.left
title: AudioPlayer.title
icon: window.stationIcon
}
CoverActionList {
id: coverAction
CoverAction {
id: playToggle
iconSource: AudioPlayer.isPlaying ? "image://theme/icon-cover-pause" : "image://theme/icon-cover-play"
onTriggered: {
if(!player.stationData)
......
import QtQuick 2.0
import Sailfish.Silica 1.0
Item {
property alias title: titleText.text
property alias icon: stationIcon.source
Image {
id: stationIcon
opacity: 0.1
smooth: true
fillMode: Image.PreserveAspectFit
cache: true
width: parent.width
height: width
transform: Rotation { origin.x: 500; origin.y: 200; axis { x: 0; y: 1; z: 0 } angle: 45 }
}
Text {
id: titleText
anchors { fill: parent; margins: 0, Theme.paddingSmall}
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignBottom
color: Theme.primaryColor
font.pixelSize: Theme.fontSizeSmall
maximumLineCount: 2
elide: Text.ElideLeft
wrapMode: Text.WordWrap
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment