Commit 186ddcf2 authored by Martin Straka's avatar Martin Straka

QML modification for material design

parent 1b51aec5
......@@ -38,7 +38,7 @@ ListView {
id: messageItem
height: listItemHeight
width: parent.width
color: (rReadLocally) ? datovkaPalette.alternateBase : datovkaPalette.base
color: (rReadLocally) ? readBgColor : datovkaPalette.base
Item {
id: msgEnvelope
anchors.fill: parent
......@@ -58,27 +58,18 @@ ListView {
id: r1c1p
anchors.centerIn: parent
sourceSize.height: parent.height * 0.8
source: if (rReadLocally) {
"qrc:/ui/email-open-outline.svg"
} else {
"qrc:/ui/email-outline.svg"
}
source: (rReadLocally) ? "qrc:/ui/email-open-outline.svg" : "qrc:/ui/email-outline.svg"
}
ColorOverlay {
anchors.fill: r1c1p
source: r1c1p
color: datovkaPalette.text
color: datovkaPalette.windowText
}
}
Text {
id: r1c2
text: (rMsgType == MessageType.TYPE_RECEIVED) ? rFrom : rTo
color: if (rReadLocally) {
datovkaPalette.text
} else {
//datovkaPalette.highlight
datovkaPalette.text
}
color: (rReadLocally) ? datovkaPalette.windowText : headerColor
font.bold: !rReadLocally
}
Item {
......@@ -89,22 +80,18 @@ ListView {
id: r2c1p
anchors.centerIn: parent
sourceSize.height: parent.height * 0.8
source: if (rAttachmentsDownloaded) {
"qrc:/ui/paperclip.svg"
} else {
"qrc:/ui/datovka-msg-blank.png"
}
source: (rAttachmentsDownloaded) ? "qrc:/ui/paperclip.svg" : "qrc:/ui/datovka-msg-blank.png"
}
ColorOverlay {
anchors.fill: r2c1p
source: r2c1p
color: datovkaPalette.text
color: datovkaPalette.windowText
}
}
Text {
id: r2c2
text: rAnnotation
color: datovkaPalette.text
color: datovkaPalette.windowText
font.bold: !rReadLocally
}
Image {
......@@ -117,12 +104,11 @@ ListView {
Text {
id: r3c2
text: rMsgId + " " + rDelivTime + " " + rAcceptTime
color: datovkaPalette.dark
color: datovkaPalette.windowText
font.pointSize: textFontSizeSmall
font.bold: !rReadLocally
}
}
} // Rectangle
} // Item
Rectangle {
id: next
anchors.verticalCenter: parent.verticalCenter
......@@ -141,7 +127,7 @@ ListView {
ColorOverlay {
anchors.fill: nextImage
source: nextImage
color: datovkaPalette.text
color: datovkaPalette.windowText
}
} // Rectangle
MouseArea {
......@@ -157,7 +143,7 @@ ListView {
anchors.top: parent.bottom
height: 1
width: parent.width
color: datovkaPalette.mid
color: datovkaPalette.dark
}
} // Rectangle
ScrollIndicator.vertical: ScrollIndicator {}
......
......@@ -32,7 +32,7 @@ Rectangle {
anchors.top: parent.top
width: parent.width
height: headerHeight
color: datovkaPalette.highlight
color: headerColor
z: 1
Image {
id: backElement
......@@ -50,4 +50,10 @@ Rectangle {
color: datovkaPalette.text
text: title
}
Rectangle {
anchors.bottom: parent.bottom
height: 1
width: parent.width
color: datovkaPalette.dark
}
}
......@@ -50,10 +50,13 @@ ApplicationWindow {
// Set default material design from system palette
Material.theme: Material.System
Material.background: datovkaPalette.base
Material.foreground: datovkaPalette.text
Material.primary: datovkaPalette.alternateBase
Material.accent: datovkaPalette.highlight
Material.background: datovkaPalette.window
Material.foreground: datovkaPalette.windowText
Material.primary: Material.Blue
Material.accent: Material.Blue
/* Some color saturation */
property color readBgColor: Qt.darker(datovkaPalette.alternateBase, 1.08)
property color headerColor: Material.color(Material.Blue)
// define all pages for stackview
property Component pageAboutApp: PageAboutApp {}
......
......@@ -187,7 +187,7 @@ Component {
anchors.fill: parent
Rectangle { // account description line
id: accountHeader
color: (!rTestAccount ? datovkaPalette.highlight : datovkaPalette.dark) // Testing accounts are shown in dark colour.
color: (!rTestAccount ? headerColor : datovkaPalette.dark) // Testing accounts are shown in dark colour.
width: parent.width
Layout.fillHeight: true
Layout.preferredWidth: parent.width
......@@ -204,7 +204,7 @@ Component {
anchors.top: parent.top
height: 1
width: parent.width
color: datovkaPalette.mid
color: datovkaPalette.dark
}
Column {
anchors.verticalCenter: parent.verticalCenter
......@@ -419,7 +419,7 @@ Component {
anchors.bottom: parent.bottom
height: 1
width: parent.width
color: datovkaPalette.mid
color: datovkaPalette.dark
}
}
}
......
......@@ -259,25 +259,24 @@ Component {
anchors.bottom: parent.bottom
anchors.right: parent.right
anchors.left: parent.left
color: datovkaPalette.base
color: datovkaPalette.window
Item {
id: attachmentLabel
width: parent.width
height: textFontSizeInPixels * 2
height: textFontSizeInPixels * 3
Text {
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.leftMargin: defaultMargin
anchors.leftMargin: defaultMargin * 2
textFormat: TextEdit.RichText
text: "<h3>" + qsTr("Attachments") + "</h3>"
font.bold: true
}
Rectangle {
id: attachmentLabelLine
anchors.bottom: parent.bottom
height: 1
width: parent.width
color: datovkaPalette.mid
color: datovkaPalette.dark
}
}
ListView {
......@@ -383,7 +382,7 @@ Component {
anchors.top: parent.bottom
height: 1
width: parent.width
color: datovkaPalette.mid
color: datovkaPalette.dark
}
}
property bool downloadStart: false
......
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