summaryrefslogtreecommitdiff
path: root/gui/components/VPNMouseArea.qml
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-08-27 19:45:41 +0200
committerkali kaneko (leap communications) <kali@leap.se>2021-11-23 21:50:58 +0100
commitcd1d46a26b923260b6c87cc93a0723b8166c609e (patch)
tree81d0fafeaeda6f5d72ec03f589cf8560cea32ed8 /gui/components/VPNMouseArea.qml
parent76585f828a36c08614df84f43d64e20fb0e7a425 (diff)
[ui] refactor ui
Diffstat (limited to 'gui/components/VPNMouseArea.qml')
-rw-r--r--gui/components/VPNMouseArea.qml37
1 files changed, 37 insertions, 0 deletions
diff --git a/gui/components/VPNMouseArea.qml b/gui/components/VPNMouseArea.qml
new file mode 100644
index 0000000..44d6465
--- /dev/null
+++ b/gui/components/VPNMouseArea.qml
@@ -0,0 +1,37 @@
+import QtQuick 2.5
+import "../themes/themes.js" as Theme
+
+MouseArea {
+ id: mouseArea
+
+ property var targetEl: parent
+ property var uiState: Theme.uiState
+ property var onMouseAreaClicked: function () {
+ parent.clicked()
+ }
+
+ //function changeState(stateName) {
+ // if (mouseArea.hoverEnabled)
+ // targetEl.state = stateName;
+ //}
+ anchors.fill: parent
+ hoverEnabled: true
+ cursorShape: !hoverEnabled ? Qt.ForbiddenCursor : Qt.PointingHandCursor
+ //onPressed: {
+ // console.debug("button pressed")
+ //changeState(uiState.statePressed)
+ //}
+ //onEntered: changeState(uiState.stateHovered)
+ //onExited: changeState(uiState.stateDefault)
+ //onCanceled: changeState(uiState.stateDefault)
+
+
+ /*
+ onReleased: {
+ if (hoverEnabled) {
+ changeState(uiState.stateDefault);
+ onMouseAreaClicked();
+ }
+ }
+*/
+}