summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-10-03 23:51:09 +0200
committerkali kaneko (leap communications) <kali@leap.se>2021-10-06 18:38:22 +0200
commitd8dd9003cf146e492c92a8d49efc4f6f3b656a5e (patch)
tree8b6814a38860bb1148ad78461a2b1dd4f9a2c903
parent7cb546e19d569b527346655f9af83609b3a73ac8 (diff)
[ui] manual box height
-rw-r--r--gui/components/Header.qml6
-rw-r--r--gui/components/Locations.qml16
2 files changed, 16 insertions, 6 deletions
diff --git a/gui/components/Header.qml b/gui/components/Header.qml
index 6682a28..ceb66df 100644
--- a/gui/components/Header.qml
+++ b/gui/components/Header.qml
@@ -15,7 +15,11 @@ ToolBar {
ToolButton {
id: settingsButton
- anchors.left: parent.left
+ anchors {
+ left: parent.left
+ // margin needed at least for the Locations panel
+ leftMargin: 5
+ }
font.pixelSize: Qt.application.font.pixelSize * 1.6
icon.source: "../resources/arrow-left.svg"
onClicked: {
diff --git a/gui/components/Locations.qml b/gui/components/Locations.qml
index 600b504..1b87f88 100644
--- a/gui/components/Locations.qml
+++ b/gui/components/Locations.qml
@@ -41,7 +41,7 @@ ThemedPage {
Rectangle {
id: autoBox
width: root.width * 0.90
- height: 100
+ height: 90
radius: 10
color: "white"
@@ -86,7 +86,7 @@ ThemedPage {
width: root.width * 0.90
radius: 10
color: Theme.fgColor
- height: root.height * 0.60
+ height: getManualBoxHeight()
anchors {
horizontalCenter: parent.horizontalCenter
@@ -141,7 +141,10 @@ ThemedPage {
id: gatewayListColumn
width: parent.width
spacing: 1
- anchors.top: getManualAnchor()
+ anchors {
+ topMargin: 10
+ top: getManualAnchor()
+ }
Repeater {
id: gwManualSelectorList
@@ -233,11 +236,14 @@ ThemedPage {
}
function getManualBoxHeight() {
- let h = gatewayListColumn.height + manualLabel.height
+ let h = Math.min(
+ root.locationsModel.length * 35,
+ root.appHeight - autoBox.height - 100
+ )
if (bridgeWarning.visible) {
h += bridgeWarning.height
}
- return h + 15
+ return h + 30
}
function getSignalFor(location) {