Debian Codegraph @

src/GUI/qml/Weblink.qml

raw
1 import QtQuick 2.4
2 import FlightGear 1.0
3
4 Rectangle {
5 id: root
6 radius: Style.roundRadius
7 color: Style.themeColor
8 property url link
9
10 property alias label: label.text
11
12 implicitHeight: label.height + Style.margin
13 implicitWidth: label.width + Style.margin * 2
14
15 StyledText {
16 id: label
17 x: Style.margin
18 anchors.verticalCenter: parent.verticalCenter
19 color: Style.themeContrastTextColor
20 font.underline: mouse.containsMouse
21 }
22
23 MouseArea {
24 id: mouse
25 anchors.fill: parent
26 hoverEnabled: true
27 cursorShape: root.clickable ? Qt.PointingHandCursor : Qt.ArrowCursor
28
29 onClicked: Qt.openUrlExternally(root.link)
30 }
31 }