1
0
Fork 0
flightgear/src/GUI/qml/ClickableText.qml

25 lines
530 B
QML
Raw Normal View History

import QtQuick 2.4
import "."
Text {
id: root
signal clicked();
property bool clickable: true
2018-03-11 11:49:38 +00:00
property color baseTextColor: Style.baseTextColor
color: mouse.containsMouse ? Style.themeColor : baseTextColor
font.pixelSize: Style.baseFontPixelSize
MouseArea {
id: mouse
enabled: root.clickable
hoverEnabled: root.clickable
anchors.fill: parent
onClicked: parent.clicked();
2018-03-11 11:49:38 +00:00
cursorShape: root.clickable ? Qt.PointingHandCursor : Qt.ArrowCursor
}
}