From 0087596a698df0e5e8475c27135a9f7c69e06eff Mon Sep 17 00:00:00 2001 From: Anton Thomasson Date: Sat, 6 Mar 2021 16:13:21 +0100 Subject: [PATCH] Add waqrning about "office" formats --- qml/pages/FirstPage.qml | 79 ++++++++++++++++---------- translations/harbour-seaprint-de.ts | 4 ++ translations/harbour-seaprint-es.ts | 4 ++ translations/harbour-seaprint-fr.ts | 4 ++ translations/harbour-seaprint-nl.ts | 4 ++ translations/harbour-seaprint-pl.ts | 4 ++ translations/harbour-seaprint-zh_CN.ts | 4 ++ translations/harbour-seaprint.ts | 4 ++ 8 files changed, 77 insertions(+), 30 deletions(-) diff --git a/qml/pages/FirstPage.qml b/qml/pages/FirstPage.qml index fd5f09d..53f2480 100644 --- a/qml/pages/FirstPage.qml +++ b/qml/pages/FirstPage.qml @@ -1,4 +1,4 @@ -import QtQuick 2.0 +import QtQuick 2.6 import Sailfish.Silica 1.0 import Sailfish.Pickers 1.0 import seaprint.ippdiscovery 1.0 @@ -333,40 +333,59 @@ Page { DockedPanel { id: fileDock open: true - height: fileLabel.height+folderButton.height+3*Theme.paddingLarge + height: panelColumn.implicitHeight width: parent.width dock: Dock.Bottom - Label { - id: fileLabel - width: parent.width-2*Theme.paddingLarge - - anchors { - top: parent.top - topMargin: Theme.paddingLarge - horizontalCenter: parent.horizontalCenter - } - - horizontalAlignment: contentWidth > width ? Text.AlignRight : Text.AlignHCenter - truncationMode: TruncationMode.Fade - text: selectedFile != "" ? selectedFile : qsTr("No file selected") - } - - - Row { + Column { + id: panelColumn width: parent.width - anchors.bottom: parent.bottom - anchors.bottomMargin: Theme.paddingLarge - IconButton { - id: folderButton - icon.source: "image://theme/icon-m-file-document" - width: parent.width/2 - onClicked: pageStack.push(documentPickerPage) + spacing: Theme.paddingLarge + topPadding: Theme.paddingLarge + bottomPadding: page.isPortrait ? 2*Theme.paddingLarge : Theme.paddingLarge + + Row { + anchors.horizontalCenter: parent.horizontalCenter + visible: Mimer.isOffice(page.selectedFileType) + + HighlightImage { + source: "image://theme/icon-s-warning" + highlighted: true + highlightColor: Theme.highlightColor + } + Label + { + text: qsTr("This format may not render correctly") + font.pixelSize: Theme.fontSizeExtraSmall + color: Theme.highlightColor + } } - IconButton { - icon.source: "image://theme/icon-m-file-image" - width: parent.width/2 - onClicked: pageStack.push(imagePickerPage) + + Label { + id: fileLabel + width: parent.width-2*Theme.paddingLarge + + horizontalAlignment: contentWidth > width ? Text.AlignRight : Text.AlignHCenter + truncationMode: TruncationMode.Fade + text: selectedFile != "" ? selectedFile : qsTr("No file selected") + } + + + Row { + width: parent.width + IconButton { + id: folderButton + icon.source: "image://theme/icon-m-file-document" + width: parent.width/2 + onClicked: pageStack.push(documentPickerPage) + } + IconButton { + id: imageButton + icon.source: "image://theme/icon-m-file-image" + width: parent.width/2 + onClicked: pageStack.push(imagePickerPage) + } + } } diff --git a/translations/harbour-seaprint-de.ts b/translations/harbour-seaprint-de.ts index ebcf6f5..6635349 100644 --- a/translations/harbour-seaprint-de.ts +++ b/translations/harbour-seaprint-de.ts @@ -275,6 +275,10 @@ Unsupported document format + + This format may not render correctly + + IppPrinter diff --git a/translations/harbour-seaprint-es.ts b/translations/harbour-seaprint-es.ts index 805d6ad..9a5d26f 100644 --- a/translations/harbour-seaprint-es.ts +++ b/translations/harbour-seaprint-es.ts @@ -275,6 +275,10 @@ Unsupported document format + + This format may not render correctly + + IppPrinter diff --git a/translations/harbour-seaprint-fr.ts b/translations/harbour-seaprint-fr.ts index 9b72f04..6ec3a6e 100644 --- a/translations/harbour-seaprint-fr.ts +++ b/translations/harbour-seaprint-fr.ts @@ -275,6 +275,10 @@ Unsupported document format + + This format may not render correctly + + IppPrinter diff --git a/translations/harbour-seaprint-nl.ts b/translations/harbour-seaprint-nl.ts index 8872b36..0d8938c 100644 --- a/translations/harbour-seaprint-nl.ts +++ b/translations/harbour-seaprint-nl.ts @@ -275,6 +275,10 @@ Unsupported document format + + This format may not render correctly + + IppPrinter diff --git a/translations/harbour-seaprint-pl.ts b/translations/harbour-seaprint-pl.ts index 7dbb3c3..3659171 100644 --- a/translations/harbour-seaprint-pl.ts +++ b/translations/harbour-seaprint-pl.ts @@ -275,6 +275,10 @@ Unsupported document format + + This format may not render correctly + + IppPrinter diff --git a/translations/harbour-seaprint-zh_CN.ts b/translations/harbour-seaprint-zh_CN.ts index 2025ca8..4e1c9e0 100644 --- a/translations/harbour-seaprint-zh_CN.ts +++ b/translations/harbour-seaprint-zh_CN.ts @@ -275,6 +275,10 @@ Unsupported document format + + This format may not render correctly + + IppPrinter diff --git a/translations/harbour-seaprint.ts b/translations/harbour-seaprint.ts index 6de68bd..78c1480 100644 --- a/translations/harbour-seaprint.ts +++ b/translations/harbour-seaprint.ts @@ -275,6 +275,10 @@ Unsupported document format + + This format may not render correctly + + IppPrinter