2018-03-19 08:22:11 +00:00
|
|
|
import QtQuick 2.4
|
2017-12-08 16:02:00 +00:00
|
|
|
import "."
|
|
|
|
|
|
|
|
Text {
|
2018-03-16 22:01:21 +00:00
|
|
|
id: root
|
2017-12-08 16:02:00 +00:00
|
|
|
signal clicked();
|
|
|
|
|
2018-03-16 22:01:21 +00:00
|
|
|
property bool clickable: true
|
2018-03-11 11:49:38 +00:00
|
|
|
property color baseTextColor: Style.baseTextColor
|
|
|
|
color: mouse.containsMouse ? Style.themeColor : baseTextColor
|
2018-06-22 11:09:35 +00:00
|
|
|
font.pixelSize: Style.baseFontPixelSize
|
2017-12-08 16:02:00 +00:00
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
id: mouse
|
2018-03-16 22:01:21 +00:00
|
|
|
|
|
|
|
enabled: root.clickable
|
|
|
|
hoverEnabled: root.clickable
|
2017-12-08 16:02:00 +00:00
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
onClicked: parent.clicked();
|
2018-03-11 11:49:38 +00:00
|
|
|
|
2018-03-16 22:01:21 +00:00
|
|
|
cursorShape: root.clickable ? Qt.PointingHandCursor : Qt.ArrowCursor
|
2017-12-08 16:02:00 +00:00
|
|
|
}
|
|
|
|
}
|