1
0
Fork 0
flightgear/src/GUI/qml/ClickableText.qml
James Turner 1bf52662ae Launcher converted to QQ2
This simplifies the launcher's rendering since the widget-based
code is gone, various things get hooked up as a result. Styling
fixes everywhere as well.

Menubar on Linux/Windows needs to be re-added.
2018-06-23 17:14:21 +01:00

24 lines
530 B
QML

import QtQuick 2.4
import "."
Text {
id: root
signal clicked();
property bool clickable: true
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();
cursorShape: root.clickable ? Qt.PointingHandCursor : Qt.ArrowCursor
}
}