summaryrefslogtreecommitdiff
path: root/gui/components
diff options
context:
space:
mode:
authorkali <kali@leap.se>2021-10-04 12:59:01 +0200
committerkali kaneko (leap communications) <kali@leap.se>2021-11-23 21:51:17 +0100
commit7691f0f2967f721f3dee100956982ff625d7d945 (patch)
tree446fb202fd11a2802fd67e7b2df3050995c9f618 /gui/components
parentf3ed99f26f6f6a7d2b3d7da47409b28b2e042c05 (diff)
[ui] workarounds for font in osx
Diffstat (limited to 'gui/components')
-rw-r--r--gui/components/Footer.qml10
-rw-r--r--gui/components/Locations.qml3
-rw-r--r--gui/components/MainView.qml8
-rw-r--r--gui/components/Splash.qml2
-rw-r--r--gui/components/VPNState.qml2
5 files changed, 19 insertions, 6 deletions
diff --git a/gui/components/Footer.qml b/gui/components/Footer.qml
index 71477b4..11f5114 100644
--- a/gui/components/Footer.qml
+++ b/gui/components/Footer.qml
@@ -11,7 +11,7 @@ ToolBar {
Material.background: Theme.bgColor
Material.foreground: "black"
Material.elevation: 0
- visible: stackView.depth > 1 && ctx !== undefined ? false : true
+ visible: isFooterVisible()
Item {
@@ -186,4 +186,12 @@ ToolBar {
return false
}
}
+
+ function isFooterVisible() {
+ console.debug(stackView.depth)
+ if (stackView.depth > 1) {
+ return false
+ }
+ return true
+ }
}
diff --git a/gui/components/Locations.qml b/gui/components/Locations.qml
index a93700a..097f9fe 100644
--- a/gui/components/Locations.qml
+++ b/gui/components/Locations.qml
@@ -60,6 +60,7 @@ ThemedPage {
id: recommendedLabel
//: Location Selection: label for radio button that selects automatically
text: qsTr("Recommended")
+ font.weight: Font.Bold
font.bold: true
}
WrappedRadioButton {
@@ -203,7 +204,7 @@ ThemedPage {
}
},
State {
- when: ctx && ctx.status == "on"
+ when: ctx != undefined && ctx.status == "on"
PropertyChanges {
target: manualLabel
text: manualSelectionLabel
diff --git a/gui/components/MainView.qml b/gui/components/MainView.qml
index 95bb212..c103565 100644
--- a/gui/components/MainView.qml
+++ b/gui/components/MainView.qml
@@ -130,7 +130,7 @@ Page {
}
font.pixelSize: 14
textFormat: Text.RichText
- text: getLink(ctx.donateURL)
+ text: getLink(ctx)
onLinkActivated: Qt.openUrlExternally(ctx.donateURL)
}
@@ -150,7 +150,11 @@ Page {
onYes: Qt.openUrlExternally(ctx.donateURL)
}
- function getLink(url) {
+ function getLink(ctx) {
+ if (!ctx) {
+ return ""
+ }
+ let url = ctx.donateURL
return "<style>a:link {color:'" + Theme.blue + "'; }</style><a href='#'>" + url + "</a>"
}
diff --git a/gui/components/Splash.qml b/gui/components/Splash.qml
index 625ab18..cf75108 100644
--- a/gui/components/Splash.qml
+++ b/gui/components/Splash.qml
@@ -57,7 +57,7 @@ Page {
if (root.error != "") {
return
}
- if (ctx && ctx.isReady) {
+ if (ctx && ctx.isReady || qmlDebug) {
splashTimer.stop()
loader.source = "MainView.qml"
} else {
diff --git a/gui/components/VPNState.qml b/gui/components/VPNState.qml
index 189fd0b..64a109a 100644
--- a/gui/components/VPNState.qml
+++ b/gui/components/VPNState.qml
@@ -20,7 +20,7 @@ StateGroup {
name: initializing
},
State {
- when: ctx && ctx.status == "off" && startingUI == true
+ when: ctx != undefined && ctx.status == "off" && startingUI == true
PropertyChanges {
target: connectionState
text: qsTr("Connecting")