Add waqrning about "office" formats

This commit is contained in:
Anton Thomasson 2021-03-06 16:13:21 +01:00
parent 0010cd593a
commit 0087596a69
8 changed files with 77 additions and 30 deletions

View file

@ -1,4 +1,4 @@
import QtQuick 2.0 import QtQuick 2.6
import Sailfish.Silica 1.0 import Sailfish.Silica 1.0
import Sailfish.Pickers 1.0 import Sailfish.Pickers 1.0
import seaprint.ippdiscovery 1.0 import seaprint.ippdiscovery 1.0
@ -333,40 +333,59 @@ Page {
DockedPanel { DockedPanel {
id: fileDock id: fileDock
open: true open: true
height: fileLabel.height+folderButton.height+3*Theme.paddingLarge height: panelColumn.implicitHeight
width: parent.width width: parent.width
dock: Dock.Bottom dock: Dock.Bottom
Label { Column {
id: fileLabel id: panelColumn
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 {
width: parent.width width: parent.width
anchors.bottom: parent.bottom spacing: Theme.paddingLarge
anchors.bottomMargin: Theme.paddingLarge topPadding: Theme.paddingLarge
IconButton { bottomPadding: page.isPortrait ? 2*Theme.paddingLarge : Theme.paddingLarge
id: folderButton
icon.source: "image://theme/icon-m-file-document" Row {
width: parent.width/2 anchors.horizontalCenter: parent.horizontalCenter
onClicked: pageStack.push(documentPickerPage) 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" Label {
width: parent.width/2 id: fileLabel
onClicked: pageStack.push(imagePickerPage) 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)
}
} }
} }

View file

@ -275,6 +275,10 @@
<source>Unsupported document format</source> <source>Unsupported document format</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>This format may not render correctly</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>IppPrinter</name> <name>IppPrinter</name>

View file

@ -275,6 +275,10 @@
<source>Unsupported document format</source> <source>Unsupported document format</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>This format may not render correctly</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>IppPrinter</name> <name>IppPrinter</name>

View file

@ -275,6 +275,10 @@
<source>Unsupported document format</source> <source>Unsupported document format</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>This format may not render correctly</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>IppPrinter</name> <name>IppPrinter</name>

View file

@ -275,6 +275,10 @@
<source>Unsupported document format</source> <source>Unsupported document format</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>This format may not render correctly</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>IppPrinter</name> <name>IppPrinter</name>

View file

@ -275,6 +275,10 @@
<source>Unsupported document format</source> <source>Unsupported document format</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>This format may not render correctly</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>IppPrinter</name> <name>IppPrinter</name>

View file

@ -275,6 +275,10 @@
<source>Unsupported document format</source> <source>Unsupported document format</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>This format may not render correctly</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>IppPrinter</name> <name>IppPrinter</name>

View file

@ -275,6 +275,10 @@
<source>Unsupported document format</source> <source>Unsupported document format</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>This format may not render correctly</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>IppPrinter</name> <name>IppPrinter</name>