Commit 7f8f7b2c authored by Martin Straka's avatar Martin Straka

Main header refactoring

parent 0e6a02c4
......@@ -37,7 +37,10 @@ ApplicationWindow {
visible: true
title: "Datovka"
width: 800
minimumWidth: 320
height: 600
minimumHeight: 240
color: datovkaPalette.window
// This element set default font (size) and must be hidden. Font is used
......@@ -94,7 +97,7 @@ ApplicationWindow {
property int navImgHeight: headerHeight * 0.3
property int listItemHeight: headerHeight * 1.5
property int defaultMargin: Math.round(Screen.pixelDensity)
property int acntListSpacing: defaultMargin * 2
property int acntListSpacing: defaultMargin * 4
property int formItemVerticalSpacing: defaultMargin
property int formButtonHorizontalSpacing: defaultMargin * 5
......
......@@ -79,11 +79,32 @@ Component {
width: parent.width
height: headerHeight
color: mainHeaderBgColor
Image {
id: headerLogo
Row {
anchors.verticalCenter: parent.verticalCenter
spacing: defaultMargin
anchors.left: parent.left
anchors.leftMargin: defaultMargin
Image {
id: settingsButton
anchors.verticalCenter: parent.verticalCenter
sourceSize.height: imgHeight
source: "qrc:/ui/menu.svg"
MouseArea {
anchors.fill: parent
onClicked: {
pageView.push(pageMenuDatovkaSettings, {
"pageView": pageView,
"statusBar": statusBar,
"accountModel": accountModel
}, StackView.Immediate)
}
}
}
}
Image {
id: headerLogo
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
sourceSize.height: imgHeight
source: "qrc:/ui/datovka@2x.png"
MouseArea {
......@@ -114,22 +135,6 @@ Component {
}
}
}
Image {
id: settingsButton
anchors.verticalCenter: parent.verticalCenter
sourceSize.height: imgHeight
source: "qrc:/ui/settings.svg"
MouseArea {
anchors.fill: parent
onClicked: {
pageView.push(pageMenuDatovkaSettings, {
"pageView": pageView,
"statusBar": statusBar,
"accountModel": accountModel
}, StackView.Immediate)
}
}
}
}
}
Text {
......
......@@ -72,6 +72,7 @@
<file>ui/lock-open.svg</file>
<file>ui/logout.svg</file>
<file>ui/magnify.svg</file>
<file>ui/menu.svg</file>
<file>ui/paperclip.svg</file>
<file>ui/pencil-box-outline.svg</file>
<file>ui/remove.svg</file>
......
<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg height="32px" id="Layer_1" style="enable-background:new 0 0 32 32;" version="1.1" viewBox="0 0 32 32" width="32px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M4,10h24c1.104,0,2-0.896,2-2s-0.896-2-2-2H4C2.896,6,2,6.896,2,8S2.896,10,4,10z M28,14H4c-1.104,0-2,0.896-2,2 s0.896,2,2,2h24c1.104,0,2-0.896,2-2S29.104,14,28,14z M28,22H4c-1.104,0-2,0.896-2,2s0.896,2,2,2h24c1.104,0,2-0.896,2-2 S29.104,22,28,22z"/></svg>
\ No newline at end of file
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