1
0
Fork 0
flightgear/utils/fgqcanvas/qml/Button.qml
James Turner 117404979b Migrate to a pure Quick-renderer solution, and QQ UI
This means everything is displayed via OpenGL, and there’s a basic
menu system usable.
2017-11-02 17:21:27 +00:00

32 lines
537 B
QML

import QtQuick 2.0
Rectangle {
id: root
property alias label: labelText.text
property bool enabled: true
signal clicked
border.width: 2
border.color: enabled ? "orange" : "9f9f9f"
color: "#3f3f3f"
implicitWidth: 100
implicitHeight: 30
Text {
id: labelText
anchors.centerIn: parent
color: enabled ? "white" : "9f9f9f"
}
MouseArea {
anchors.fill: parent
enabled: root.enabled
onClicked: {
root.clicked();
}
}
}