summaryrefslogtreecommitdiff
path: root/gui/components
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-10-06 19:23:00 +0200
committerkali kaneko (leap communications) <kali@leap.se>2021-11-23 21:51:19 +0100
commit49755a3271a19ab8e441406c7095e283a2d6241e (patch)
treed9ac87dc8d772e4d65f173c6c2bc2a77e10620de /gui/components
parent94d6694a7b91f3ea5a8649f13a68a907e2bc95f3 (diff)
[ui] pointing hand for locations and buttons
Diffstat (limited to 'gui/components')
-rw-r--r--gui/components/Footer.qml20
-rw-r--r--gui/components/Header.qml5
-rw-r--r--gui/components/Locations.qml12
-rw-r--r--gui/components/StatusBox.qml13
4 files changed, 31 insertions, 19 deletions
diff --git a/gui/components/Footer.qml b/gui/components/Footer.qml
index a69f377..24b6cfa 100644
--- a/gui/components/Footer.qml
+++ b/gui/components/Footer.qml
@@ -1,4 +1,4 @@
-import QtQuick 2.0
+import QtQuick 2.15
import QtQuick.Controls 2.4
import QtQuick.Controls.Material 2.1
import QtQuick.Layouts 1.14
@@ -25,20 +25,17 @@ ToolBar {
anchors {
verticalCenter: parent.verticalCenter
leftMargin: 10
- // TODO discuss where this should be aligned
- //leftMargin: 22
left: parent.left
verticalCenterOffset: 5
}
- /*
- background.implicitHeight: 32
- background.implicitWidth: 32
- */
icon {
width: 20
height: 20
source: stackView.depth > 1 ? "" : "../resources/globe.svg"
}
+ HoverHandler {
+ cursorShape: Qt.PointingHandCursor
+ }
onClicked: stackView.push("Locations.qml")
}
@@ -64,14 +61,19 @@ ToolBar {
Label {
id: locationLabel
+ text: locationStr()
+ color: getLocationColor()
anchors {
left: lightning.right
verticalCenter: parent.verticalCenter
verticalCenterOffset: 7
leftMargin: (ctx != undefined & root.selectedGateway == "auto") ? 0 : -12
}
- text: locationStr()
- color: getLocationColor()
+ MouseArea {
+ cursorShape: Qt.PointingHandCursor
+ anchors.fill: parent
+ onClicked: stackView.push("Locations.qml")
+ }
}
Item {
diff --git a/gui/components/Header.qml b/gui/components/Header.qml
index ceb66df..d42ea26 100644
--- a/gui/components/Header.qml
+++ b/gui/components/Header.qml
@@ -1,4 +1,4 @@
-import QtQuick 2.0
+import QtQuick 2.15
import QtQuick.Controls 2.4
import QtQuick.Dialogs 1.2
import QtQuick.Controls.Material 2.1
@@ -22,6 +22,9 @@ ToolBar {
}
font.pixelSize: Qt.application.font.pixelSize * 1.6
icon.source: "../resources/arrow-left.svg"
+ HoverHandler {
+ cursorShape: Qt.PointingHandCursor
+ }
onClicked: {
if (stackView.depth > 1) {
stackView.pop()
diff --git a/gui/components/Locations.qml b/gui/components/Locations.qml
index 097f9fe..624d5a0 100644
--- a/gui/components/Locations.qml
+++ b/gui/components/Locations.qml
@@ -1,4 +1,4 @@
-import QtQuick 2.9
+import QtQuick 2.15
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.14
import QtGraphicalEffects 1.0
@@ -60,7 +60,7 @@ ThemedPage {
id: recommendedLabel
//: Location Selection: label for radio button that selects automatically
text: qsTr("Recommended")
- font.weight: Font.Bold
+ font.weight: Font.Bold
font.bold: true
}
WrappedRadioButton {
@@ -72,6 +72,9 @@ ThemedPage {
top: recommendedLabel.bottom
leftMargin: -5
}
+ HoverHandler {
+ cursorShape: Qt.PointingHandCursor
+ }
onClicked: {
root.selectedGateway = "auto"
console.debug("Selected gateway: auto")
@@ -131,11 +134,11 @@ ThemedPage {
color: "gray"
visible: isBridgeSelected()
wrapMode: Text.Wrap
+ font.pixelSize: Theme.fontSize - 3
anchors {
topMargin: 5
top: manualLabel.bottom
}
- font.pixelSize: Theme.fontSize - 3
}
ColumnLayout {
@@ -160,6 +163,9 @@ ThemedPage {
ButtonGroup.group: locsel
checked: false
enabled: locationPage.switching ? false : true
+ HoverHandler {
+ cursorShape: Qt.PointingHandCursor
+ }
onClicked: {
if (ctx.status == "on") {
locationPage.switching = true
diff --git a/gui/components/StatusBox.qml b/gui/components/StatusBox.qml
index 15eef2e..17132ea 100644
--- a/gui/components/StatusBox.qml
+++ b/gui/components/StatusBox.qml
@@ -1,4 +1,4 @@
-import QtQuick 2.12
+import QtQuick 2.15
import QtQuick.Controls 2.12
import QtGraphicalEffects 1.14
import QtQuick.Layouts 1.14
@@ -29,7 +29,6 @@ Item {
height: 300
radius: 10
antialiasing: true
-
anchors {
fill: parent
margins: 20
@@ -46,14 +45,15 @@ Item {
objectName: "settingsButton"
font.pixelSize: Qt.application.font.pixelSize * 1.6
opacity: 1
-
anchors {
top: parent.top
left: parent.left
topMargin: Theme.windowMargin + 5
leftMargin: Theme.windowMargin + 5
}
-
+ HoverHandler {
+ cursorShape: Qt.PointingHandCursor
+ }
onClicked: {
if (stackView.depth > 1) {
stackView.pop()
@@ -126,16 +126,17 @@ Item {
// FIXME - this is a workaround. It will BREAK with i18n
width: 100
spacing: 8
-
anchors.horizontalCenter: parent.horizontalCenter
Layout.alignment: Qt.AlignBottom
-
font {
pixelSize: Theme.buttonFontSize
capitalization: Font.Capitalize
family: lightFont.name
bold: false
}
+ HoverHandler {
+ cursorShape: Qt.PointingHandCursor
+ }
onClicked: {
if (vpn.state === "on" | vpn.state === "starting") {