diff --git a/src/qml/BadLayerItem.qml b/src/qml/BadLayerItem.qml index 233a884128..76d62098b7 100644 --- a/src/qml/BadLayerItem.qml +++ b/src/qml/BadLayerItem.qml @@ -6,21 +6,26 @@ import org.qfield 1.0 import Theme 1.0 Page { + id: badLayerPage + property alias model: table.model - signal finished + padding: 5 + width: mainWindow.width + height: mainWindow.height + header: PageHeader { - title: qsTr( 'Unable to load some layers' ) + title: qsTr( 'Unable to load some layers' ) - showBackButton: false - showApplyButton: false - showCancelButton: true + showBackButton: false + showApplyButton: false + showCancelButton: true - topMargin: mainWindow.sceneTopMargin + topMargin: mainWindow.sceneTopMargin - onFinished: parent.finished() - } + onFinished: badLayerPage.visible = false + } ColumnLayout { anchors.margins: 8 @@ -30,15 +35,13 @@ Page { spacing: 10 Label { + Layout.fillWidth: true + Layout.fillHeight: false + text: qsTr( "The following layers could not be loaded, please review those and reconfigure the QGIS project." ) font: Theme.defaultFont color: Theme.mainTextColor - wrapMode: Text.WordWrap - Layout.fillWidth: true - Layout.fillHeight: true - Layout.minimumHeight: contentHeight - Layout.maximumHeight: contentHeight } Rectangle { @@ -56,6 +59,14 @@ Page { spacing: 2 anchors.fill: parent + model: BadLayerHandler { + project: qgisProject + + onBadLayersFound: { + badLayerPage.visible = true + } + } + delegate: Rectangle { id: rectangle width: parent ? parent.width : undefined @@ -91,20 +102,17 @@ Page { } Label { + Layout.fillWidth: true + Layout.fillHeight: false + Layout.topMargin: 5 + text: qsTr( 'You may check the %1Portable Project%2 documentation page for more help.') .arg( "" ) .arg( "" ) - textFormat: Text.RichText font: Theme.tipFont color: Theme.secondaryTextColor - wrapMode: Text.WordWrap - Layout.fillWidth: true - Layout.fillHeight: true - Layout.minimumHeight: contentHeight - Layout.maximumHeight: contentHeight - Layout.topMargin: 5 onLinkActivated: (link) => { Qt.openUrlExternally(link) } } diff --git a/src/qml/qgismobileapp.qml b/src/qml/qgismobileapp.qml index 727ff14a8f..64b1822f96 100644 --- a/src/qml/qgismobileapp.qml +++ b/src/qml/qgismobileapp.qml @@ -3580,21 +3580,7 @@ ApplicationWindow { BadLayerItem { id: badLayersView - - anchors.fill: parent - model: BadLayerHandler { - project: qgisProject - - onBadLayersFound: { - badLayersView.visible = true - } - } - visible: false - - onFinished: { - visible = false - } } Item {