diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2021-11-29 17:12:06 +0100 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-11-29 18:14:18 +0100 |
commit | dcf660f343a7ba85feb693ee5db40894829e7804 (patch) | |
tree | 7fe2edbe01e82827fba2c25de6965808557c8f67 /gui/components/Locations.qml | |
parent | 74970372b6586b336364ac1affac9dd7d22baef1 (diff) |
[ui] ui fixes after field test recommendations
Diffstat (limited to 'gui/components/Locations.qml')
-rw-r--r-- | gui/components/Locations.qml | 57 |
1 files changed, 50 insertions, 7 deletions
diff --git a/gui/components/Locations.qml b/gui/components/Locations.qml index 624d5a0..30a34e5 100644 --- a/gui/components/Locations.qml +++ b/gui/components/Locations.qml @@ -56,12 +56,37 @@ ThemedPage { fill: parent margins: 10 } - Label { - id: recommendedLabel - //: Location Selection: label for radio button that selects automatically - text: qsTr("Recommended") - font.weight: Font.Bold - font.bold: true + Rectangle { + id: recommendedHeader + height: 20 + Label { + id: recommendedLabel + //: Location Selection: label for radio button that selects automatically + text: qsTr("Recommended") + font.weight: Font.Bold + font.bold: true + } + Image { + id: lightning + smooth: true + width: 16 + source: "../resources/lightning.svg" + fillMode: Image.PreserveAspectFit + verticalAlignment: Image.AlignVCenter + anchors { + left: recommendedLabel.right + top: parent.top + leftMargin: 5 + topMargin: 2 + //verticalCenterOffset: 3 + } + ColorOverlay{ + anchors.fill: lightning + source: lightning + color: "black" + antialiasing: true + } + } } WrappedRadioButton { id: autoRadioButton @@ -69,7 +94,7 @@ ThemedPage { ButtonGroup.group: locsel checked: false anchors { - top: recommendedLabel.bottom + top: recommendedHeader.bottom leftMargin: -5 } HoverHandler { @@ -226,11 +251,20 @@ ThemedPage { function getAutoLabel() { let l = autoSelectionLabel + /* There's been some discussion about whether to include this. + An argument is that it is not 100% sure that we're going to connect + to this "recommended" gateway. However, it's fair to tell the user what's likely + to be the recomended location, to make a better choice. ALso, we can + implement a warning if finally connecting to a different location. + That said, all is made worse by the fact that menshen will not return + the "right" location if we're connecting from the vpn, a proxy etc... For that we need to modify menshen to accept a location parameter. + Disabling the hint for now, but some agreement needs to be done on android + desktop about this behavior. if (ctx && ctx.locations && ctx.bestLocation) { let best = ctx.locationLabels[ctx.bestLocation] let label = best[0] + ", " + best[1] l += " (" + label + ")" } + */ return l } @@ -267,6 +301,15 @@ ThemedPage { } } + function getLocationColor() { + if (ctx && ctx.status == "on") { + return "black" + } else { + // TODO darker gray + return "gray" + } + } + function isBridgeSelected() { if (ctx && ctx.transport == "obfs4") { return true |