Commit 1c9d0414 authored by Martin Straka's avatar Martin Straka

Disabled material and hiDPI, Column instead of ColumnLayout

parent a750d0ef
......@@ -88,7 +88,7 @@ ApplicationWindow {
property int listItemHeight: headerHeight * 1.5
property int defaultMargin: Math.round(Screen.pixelDensity)
property int acntListSpacing: defaultMargin * 2
property int formItemVerticalSpacing: defaultMargin * 3
property int formItemVerticalSpacing: defaultMargin
property int formButtonHorizontalSpacing: defaultMargin * 5
/* compare message delivery date with current date-90days */
......@@ -208,8 +208,9 @@ ApplicationWindow {
objectName: "lockScreen"
anchors.fill: parent
color: datovkaPalette.base
ColumnLayout {
Column {
anchors.centerIn: parent
spacing: formItemVerticalSpacing
TextField {
id: pinCodeInput
height: inputItemHeight
......@@ -252,7 +253,7 @@ ApplicationWindow {
}
Item {
id: blankField
Layout.fillWidth: true
width: parent.width
height: headerHeight
anchors.horizontalCenter: parent.horizontalCenter
}
......@@ -269,7 +270,7 @@ ApplicationWindow {
color: datovkaPalette.text
text: qsTr("Version") + ": " + settings.appVersion()
}
} // ColumnLayout
} // Column
Connections {
target: settings
onSendPinReply: {
......
......@@ -59,13 +59,14 @@ Item {
Pane {
id: flickContent
anchors.fill: parent
ColumnLayout {
Column {
anchors.right: parent.right
anchors.left: parent.left
spacing: formItemVerticalSpacing * 2
Text {
id: pageLabel
anchors.horizontalCenter: parent.horizontalCenter
Layout.fillWidth: true
width: parent.width
font.bold: true
color: datovkaPalette.text
horizontalAlignment: Text.AlignHCenter
......@@ -96,7 +97,7 @@ Item {
id: infoLabel
anchors.horizontalCenter: parent.horizontalCenter
color: datovkaPalette.text
Layout.fillWidth: true
width: parent.width
textFormat: TextEdit.RichText
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
......
......@@ -191,7 +191,7 @@ Component {
Rectangle { // account description line
id: accountHeader
color: (!rTestAccount ? datovkaPalette.highlight : datovkaPalette.dark) // Testing accounts are shown in dark colour.
Layout.fillWidth: true
width: parent.width
Layout.fillHeight: true
Layout.preferredWidth: parent.width
Layout.preferredHeight: headerHeight
......@@ -284,7 +284,7 @@ Component {
}
Rectangle { // received messages line
color: datovkaPalette.base
Layout.fillWidth: true
width: parent.width
Layout.fillHeight: true
Layout.preferredWidth: parent.width
Layout.preferredHeight: headerHeight
......@@ -353,7 +353,7 @@ Component {
}
Rectangle { // sent messages line
color: datovkaPalette.base
Layout.fillWidth: true
width: parent.width
Layout.fillHeight: true
Layout.preferredWidth: parent.width
Layout.preferredHeight: headerHeight
......
......@@ -93,13 +93,14 @@ Item {
function doSearchRequest() {
return (messages.searchMsg(messageModel, searchPhraseText.text, soughtMsgType) <= 0)
}
ColumnLayout {
Column {
anchors.right: parent.right
anchors.left: parent.left
spacing: formItemVerticalSpacing
ComboBox {
id: searchOptionComboBox
currentIndex: 0
Layout.fillWidth: true
width: parent.width
height: inputItemHeight
textRole: "label"
font.pointSize: defaultTextFont.font.pointSize
......@@ -135,7 +136,7 @@ Item {
id: searchPhraseText
placeholderText: qsTr("Enter phrase")
focus: true
Layout.fillWidth: true
width: parent.width
font.pointSize: defaultTextFont.font.pointSize
height: inputItemHeight
onAccepted: emptyList.visible = searchPanel.doSearchRequest()
......
......@@ -116,9 +116,10 @@ Item {
Pane {
id: flickContent
anchors.fill: parent
ColumnLayout {
Column {
anchors.right: parent.right
anchors.left: parent.left
spacing: formItemVerticalSpacing
Text {
id: loginMethodLabel
color: datovkaPalette.text
......@@ -127,7 +128,7 @@ Item {
ComboBox {
id: loginMethodComboBox
currentIndex: 0
Layout.fillWidth: true
width: parent.width
height: inputItemHeight
textRole: "label"
font.pointSize: defaultTextFont.font.pointSize
......@@ -209,7 +210,7 @@ Item {
}
TextField {
id: accountNameTextField
Layout.fillWidth: true
width: parent.width
height: inputItemHeight
font.pointSize: defaultTextFont.font.pointSize
placeholderText: qsTr("Enter your account name")
......@@ -231,7 +232,7 @@ Item {
}
TextField {
id: userNameTextField
Layout.fillWidth: true
width: parent.width
height: inputItemHeight
font.pointSize: defaultTextFont.font.pointSize
inputMethodHints: Qt.ImhLowercaseOnly
......@@ -254,7 +255,7 @@ Item {
}
TextField {
id: passwordTextField
Layout.fillWidth: true
width: parent.width
height: inputItemHeight
font.pointSize: defaultTextFont.font.pointSize
echoMode: TextInput.Password
......@@ -286,7 +287,7 @@ Item {
Text {
id: testAccountLabel
color: datovkaPalette.mid
Layout.fillWidth: true
width: parent.width
text: qsTr("Test accounts are used to access the ISDS testing environment.")
wrapMode: Text.Wrap
}
......@@ -298,7 +299,7 @@ Item {
}
Text {
color: datovkaPalette.mid
Layout.fillWidth: true
width: parent.width
text: (useLS.checked ?
qsTr("Messages and attachments will be locally stored. No active internet connection is needed to access locally stored data.") :
qsTr("Messages and attachments will be stored only temporarily in memory. These data will be lost on application exit."))
......
......@@ -86,9 +86,10 @@ Item {
Pane {
id: flickContent
anchors.fill: parent
ColumnLayout {
Column {
anchors.right: parent.right
anchors.left: parent.left
spacing: formItemVerticalSpacing
Text {
id: languageLabel
color: datovkaPalette.text
......@@ -97,7 +98,7 @@ Item {
ComboBox {
id: languageComboBoxId
currentIndex: 0
Layout.fillWidth: true
width: parent.width
height: inputItemHeight
textRole: "label"
font.pointSize: defaultTextFont.font.pointSize
......@@ -124,14 +125,14 @@ Item {
}
Text {
color: datovkaPalette.mid
Layout.fillWidth: true
width: parent.width
text: qsTr("Note: Language will be changed after application restart.")
wrapMode: Text.Wrap
}
Text {
id: fontSizeLabel
color: datovkaPalette.text
Layout.fillWidth: true
width: parent.width
text: qsTr("Font size and application scale")
}
SpinBox {
......@@ -158,7 +159,7 @@ Item {
}
Text {
color: datovkaPalette.mid
Layout.fillWidth: true
width: parent.width
text: qsTr("Note: Font size will be changed after application restart. Default is %1.").arg(fontSizeSpinBox.dflt)
wrapMode: Text.Wrap
}
......
......@@ -237,14 +237,15 @@ Item {
Pane {
id: flickContent
anchors.fill: parent
ColumnLayout {
Column {
anchors.right: parent.right
anchors.left: parent.left
spacing: formItemVerticalSpacing
Text {
id: topLineText
anchors.horizontalCenter: parent.horizontalCenter
color: datovkaPalette.mid
Layout.fillWidth: true
width: parent.width
text: ""
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.Wrap
......@@ -320,7 +321,7 @@ Item {
anchors.horizontalCenter: parent.horizontalCenter
font.bold: true
color: datovkaPalette.text
Layout.fillWidth: true
width: parent.width
text: ""
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.Wrap
......@@ -329,7 +330,7 @@ Item {
id: lockIntervalLabel
color: datovkaPalette.text
anchors.horizontalCenter: parent.horizontalCenter
Layout.fillWidth: true
width: parent.width
text: qsTr("Lock after seconds of inactivity")
horizontalAlignment: Text.AlignHCenter
}
......
......@@ -85,9 +85,10 @@ Item {
Pane {
id: flickContent
anchors.fill: parent
ColumnLayout {
Column {
anchors.right: parent.right
anchors.left: parent.left
spacing: formItemVerticalSpacing
Text {
id: messageLifeLabel
color: datovkaPalette.text
......@@ -104,7 +105,7 @@ Item {
}
Text {
color: datovkaPalette.mid
Layout.fillWidth: true
width: parent.width
text: if (messageLifeSpinBox.val() == 0) {
qsTr("Messages won't automatically be deleted from the local storage.")
} else {
......@@ -128,7 +129,7 @@ Item {
}
Text {
color: datovkaPalette.mid
Layout.fillWidth: true
width: parent.width
text: if (attachLifeSpinBox.val() == 0) {
qsTr("Attachments won't be deleted from the local storage as long as the corresponding messages won't be deleted.")
} else {
......@@ -144,7 +145,7 @@ Item {
Text {
id: dbPathText
color: datovkaPalette.mid
Layout.fillWidth: true
width: parent.width
wrapMode: Text.Wrap
text: ""
}
......@@ -199,7 +200,7 @@ Item {
Text {
id: vacuumText
color: datovkaPalette.mid
Layout.fillWidth: true
width: parent.width
wrapMode: Text.Wrap
text: qsTr("The action performs a clean-up in local databases in order to optimise their speed and size. Note: It may take a while to complete this action.")
}
......
......@@ -85,9 +85,10 @@ Item {
Pane {
id: flickContent
anchors.fill: parent
ColumnLayout {
Column {
anchors.right: parent.right
anchors.left: parent.left
spacing: formItemVerticalSpacing
Switch {
id: idownloadOnlyNewMsgs
text: qsTr("Download only newer messages")
......@@ -97,7 +98,7 @@ Item {
Text {
id: downloadOnlyNewDescription
color: datovkaPalette.mid
Layout.fillWidth: true
width: parent.width
text: (idownloadOnlyNewMsgs.checked ?
qsTr("Only messages which are not older than 90 days will be downloaded.") :
qsTr("All available messages (including those in the data vault) will be downloaded."))
......@@ -110,7 +111,7 @@ Item {
}
Text {
color: datovkaPalette.mid
Layout.fillWidth: true
width: parent.width
text: (idownloadCompleteMsgs.checked ?
qsTr("Complete messages will be downloaded during account synchronisation. This may be slow.") :
qsTr("Only message envelopes will be downloaded during account synchronisation."))
......
......@@ -167,11 +167,9 @@ void registerQmlTypes(const char *uri, const char *location,
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
//#if defined(Q_OS_ANDROID)
qputenv("QT_QUICK_CONTROLS_STYLE", "material");
//#endif /* defined(Q_OS_ANDROID) */
// Disable hiDPI and material
//QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
//qputenv("QT_QUICK_CONTROLS_STYLE", "material");
/* First thing to create is the application object. */
QApplication app(argc, argv);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment