src/GUI/qml/BackButton.qml
raw| 1 | import QtQuick 2.4 |
| 2 | import FlightGear 1.0 |
| 3 | |
| 4 | Item { |
| 5 | id: root |
| 6 | signal clicked |
| 7 | property bool enabled: true |
| 8 | |
| 9 | width: image.width + Style.margin |
| 10 | height: image.height + Style.margin |
| 11 | |
| 12 | Image { |
| 13 | id: image |
| 14 | anchors.centerIn: parent |
| 15 | source: mouse.containsMouse ? "image://colored-icon/back?active" : "image://colored-icon/back" |
| 16 | } |
| 17 | |
| 18 | MouseArea { |
| 19 | id: mouse |
| 20 | hoverEnabled: true |
| 21 | anchors.fill: parent |
| 22 | |
| 23 | onClicked: { |
| 24 | root.clicked(); |
| 25 | } |
| 26 | } |
| 27 | } |