From 66eff092a96de5030b9cc7935c980bb20b9c6b9b Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Sun, 3 Oct 2021 23:51:09 +0200 Subject: [ui] manual box height --- gui/components/Header.qml | 6 +++++- gui/components/Locations.qml | 16 +++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'gui') 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) { -- cgit v1.2.3