FooterButton.qml 974 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
import QtQuick 2.9
import QtQuick.Controls 2.0
import App 1.0

Button {
    id: button

    property alias buttonImage: backImage.source

    height: 53
    width: 150
12
    font.pixelSize: Variables.fontFooterButton
13
    flat: true
14
    opacity: 0
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

    contentItem: Label {
        color: "#ffffff"
        text: button.text
        font: button.font
        verticalAlignment: Text.AlignVCenter
        horizontalAlignment: Text.AlignHCenter
    }

    background:
    Item
    {
        Image {
            visible: enabled
            id: backImage
            anchors.fill: parent
            fillMode: Image.PreserveAspectFit
            source: "Assets/Buttons/blue_btn_171x42.png"
        }
        Image {
            visible: !enabled
            anchors.fill: parent
            fillMode: Image.PreserveAspectFit
            source: "Assets/Buttons/grey_btn_171x42.png"
        }

    }

    Behavior on opacity
    {
        NumberAnimation { duration: 50 }
    }
}