MusicContainerForm.ui.qml 2.27 KB
Newer Older
Tomi Korpipää's avatar
Tomi Korpipää committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.0

Item {
    id: music
    width: 680
    height: 680
    property alias albumText: album.text
    property alias artistText: artist.text
    property alias albumCoverSource: albumCover.source
    property alias progressBar: progressBar

    Image {
        id: image
        anchors.fill: parent
        source: "musicBackground.png"
    }

    Text {
        id: title
        x: 150
        width: 184
        height: 57
        color: "#ffffff"
        text: qsTr("Music")
        verticalAlignment: Text.AlignBottom
        horizontalAlignment: Text.AlignHCenter
        anchors.top: parent.top
        anchors.topMargin: 0
        anchors.horizontalCenter: parent.horizontalCenter
        font.pixelSize: 60
    }

    ProgressBar {
        id: progressBar
        y: 484
        opacity: 0.5
        to: 1
        anchors.left: albumContainer.left
        anchors.leftMargin: 0
        anchors.right: albumContainer.right
        anchors.rightMargin: 0
        value: 0
    }

    Text {
        id: album
        x: 329
        y: 148
        color: "#ffffff"
        text: qsTr("Will To Power")
        verticalAlignment: Text.AlignTop
        horizontalAlignment: Text.AlignHCenter
        anchors.horizontalCenterOffset: 2
        anchors.horizontalCenter: parent.horizontalCenter
        font.pixelSize: 40
    }

    Text {
        id: artist
        x: 329
        y: 94
        color: "#ffffff"
        text: qsTr("Arch Enemy")
        horizontalAlignment: Text.AlignHCenter
        anchors.horizontalCenterOffset: 2
        anchors.horizontalCenter: parent.horizontalCenter
        font.pixelSize: 40
    }

    Rectangle {
        id: albumContainer
        x: 212
        y: 212
        width: 276
        height: 276
        color: "#00000000"
        radius: 15
        border.color: "#00000000"
        border.width: 10
        anchors.verticalCenter: parent.verticalCenter
        anchors.horizontalCenter: parent.horizontalCenter

        Image {
            id: albumCover
            x: 0
            y: 0
            width: 256
            height: 256
            anchors.horizontalCenter: parent.horizontalCenter
            anchors.verticalCenter: parent.verticalCenter
            source: "album1.png"
        }
    }
}