qmlFrontend/qml/qmlFrontend/HWButton.qml
author unc0rr
Thu, 02 Apr 2015 21:09:56 +0300
branchqmlfrontend
changeset 10886 99273b7afbff
parent 10422 4cf23d4c7624
child 11787 bcba7938ccb5
permissions -rw-r--r--
- Merge default - *cough* sorry, but also in this commit: move *.qml files into qrc, include qmlFrontend into cmake build, also exclude QTfrontend

import QtQuick 2.0

Rectangle {
    id: hwbutton
    width: 360
    height: 360
    color: "#15193a"
    radius: 8
    border.width: 4
    opacity: 1

    signal clicked()

    Behavior on border.color {
        ColorAnimation {}
    }

    MouseArea {
        id: mousearea
        anchors.fill: parent
        hoverEnabled: true
        onClicked: parent.clicked()
    }

    states: [
        State {
            when: mousearea.containsMouse

            PropertyChanges {
                target: hwbutton
                border.color: "#eaea00"
            }
        }
        , State {
            when: !mousearea.containsMouse

            PropertyChanges {
                target: hwbutton
                border.color: "#ea761d"
            }
    }]
}