Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix of the MMGpsDataDrawer #3051

Merged
merged 2 commits into from
Feb 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 13 additions & 37 deletions app/qml/misc/MMGpsDataDrawer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Drawer {
property real rowHeight: 67 * __dp

width: ApplicationWindow.window.width
height: (mainColumn.height > ApplicationWindow.window.height ? ApplicationWindow.window.height : mainColumn.height) - 20 * __dp
height: (mainColumn.height > ApplicationWindow.window.height ? ApplicationWindow.window.height : mainColumn.height)
edge: Qt.BottomEdge

focus: true
Expand Down Expand Up @@ -80,6 +80,7 @@ Drawer {
spacing: 40 * __dp

MMHeader {

id: header

rightMarginShift: 0
Expand Down Expand Up @@ -113,18 +114,7 @@ Drawer {
Layout.rightMargin: 20 * __dp
Layout.maximumWidth: __style.maxPageWidth
Layout.alignment: Qt.AlignHCenter
Layout.preferredHeight: {
if (ApplicationWindow.window){
var availableHeight = ApplicationWindow.window.height - header.height - mainColumn.spacing
var totalHeight = scrollColumn.childrenRect.height + 20 * __dp

if(totalHeight >= ApplicationWindow.window.height) {
return availableHeight
}
return totalHeight
}
return 0
}
Layout.preferredHeight: ApplicationWindow.window.height - header.height - primaryButton.height - mainColumn.spacing * 3
contentWidth: availableWidth
contentHeight: scrollColumn.childrenRect.height

Expand Down Expand Up @@ -317,30 +307,16 @@ Drawer {
descriptionText: __appSettings.gpsAntennaHeight > 0 ? __inputUtils.formatNumber(__appSettings.gpsAntennaHeight, 3) + " m" : qsTr( "Not set" )
}
}

Item {
width: 1
height: 20 * __dp
}

MMButton {
id: primaryButton

width: parent.width - 2 * 20 * __dp
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottomMargin: 20

text: qsTr("Manage GPS receivers")

onClicked: {
additionalContent.push( positionProviderComponent )
}
}

Item {
width: 2
height: 20 * __dp
}
}
}
MMButton {
id: primaryButton
text: qsTr("Manage GPS receivers")
Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom
Layout.margins: ( mainColumn.spacing / 2 ) * __dp
width: parent.width - 2 * 20 * __dp
onClicked: {
additionalContent.push(positionProviderComponent)
}
}
}
Expand Down
Loading