Skip to content

Commit

Permalink
Fix UI/UX shortcomings in the about QField popup, avoid map canvas in…
Browse files Browse the repository at this point in the history
…teractions
  • Loading branch information
nirvn committed Jan 21, 2025
1 parent e061855 commit eb5678b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
17 changes: 12 additions & 5 deletions src/qml/About.qml
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,23 @@ Item {
id: information
spacing: 6
width: aboutPanel.width - 40
height: Math.max(mainWindow.height - linksButton.height * 2 - qfieldAppDirectoryLabel.height - aboutContainer.spacing * 3 - aboutContainer.anchors.topMargin - aboutContainer.anchors.bottomMargin, qfieldPart.height + opengisPart.height + spacing)
height: Math.max(mainWindow.height - sponsorshipButton.height - linksButton.height - qfieldAppDirectoryLabel.height - aboutContainer.spacing * 3 - aboutContainer.anchors.topMargin - aboutContainer.anchors.bottomMargin - 10,
qfieldPart.height + opengisPart.height + spacing)

ColumnLayout {
id: qfieldPart
Layout.fillWidth: true
Layout.fillHeight: true
Layout.alignment: Qt.AlignHCenter

MouseArea {
Layout.preferredWidth: 138
Layout.preferredHeight: 138
Layout.alignment: Qt.AlignHCenter
Image {
id: qfieldLogo
width: parent.width
height: parent.height
fillMode: Image.PreserveAspectFit
source: "qrc:/images/qfield_logo.svg"
sourceSize.width: width * screen.devicePixelRatio
sourceSize.height: height * screen.devicePixelRatio
Expand All @@ -70,12 +73,13 @@ Item {

Label {
Layout.fillWidth: true
Layout.maximumWidth: parent.width
Layout.alignment: Qt.AlignCenter
horizontalAlignment: Text.AlignHCenter
font: Theme.strongFont
color: Theme.light
textFormat: Text.RichText
wrapMode: Text.WordWrap

text: {
let links = '<a href="https://github.com/opengisch/QField/commit/' + gitRev + '">' + gitRev.substr(0, 6) + '</a>';
if (appVersion && appVersion !== '1.0.0') {
Expand All @@ -87,22 +91,25 @@ Item {
const dependenciesStr = dependencies.map(pair => pair.join(" ")).join(" | ");
return "QField<br>" + appVersionStr + " (" + links + ")<br>" + dependenciesStr;
}

onLinkActivated: link => Qt.openUrlExternally(link)
}
}

ColumnLayout {
id: opengisPart
Layout.fillWidth: true
Layout.fillHeight: true
Layout.alignment: Qt.AlignHCenter

MouseArea {
Layout.preferredWidth: 91
Layout.preferredHeight: 113
Layout.alignment: Qt.AlignHCenter
Image {
id: opengisLogo
width: parent.width
height: parent.height
fillMode: Image.PreserveAspectFit
source: "qrc:/images/opengis-logo.svg"
sourceSize.width: width * screen.devicePixelRatio
sourceSize.height: height * screen.devicePixelRatio
Expand All @@ -112,7 +119,6 @@ Item {

Label {
Layout.fillWidth: true
Layout.maximumWidth: parent.width
Layout.alignment: Qt.AlignCenter
horizontalAlignment: Text.AlignHCenter
font: Theme.strongFont
Expand All @@ -135,6 +141,7 @@ Item {
font: Theme.tinyFont
color: Theme.secondaryTextColor
textFormat: Text.RichText
wrapMode: Text.WordWrap

text: {
let label = '';
Expand Down
2 changes: 1 addition & 1 deletion src/qml/qgismobileapp.qml
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ ApplicationWindow {
MapCanvas {
id: mapCanvasMap

property bool isEnabled: !dashBoard.opened && !welcomeScreen.visible && !qfieldSettings.visible && !qfieldLocalDataPickerScreen.visible && !qfieldCloudScreen.visible && !qfieldCloudPopup.visible && !codeReader.visible && !sketcher.visible && !overlayFeatureFormDrawer.visible && !rotateFeaturesToolbar.rotateFeaturesRequested
property bool isEnabled: !dashBoard.opened && !aboutDialog.visible && !welcomeScreen.visible && !qfieldSettings.visible && !qfieldLocalDataPickerScreen.visible && !qfieldCloudScreen.visible && !qfieldCloudPopup.visible && !codeReader.visible && !sketcher.visible && !overlayFeatureFormDrawer.visible && !rotateFeaturesToolbar.rotateFeaturesRequested
interactive: isEnabled && !screenLocker.enabled
isMapRotationEnabled: qfieldSettings.enableMapRotation
incrementalRendering: true
Expand Down

0 comments on commit eb5678b

Please sign in to comment.