Skip to content
Snippets Groups Projects
Commit 90d4da4f authored by littletux89@gmail.com's avatar littletux89@gmail.com
Browse files

[*] Changed the design of the header dashboard.

parent 581e48fe
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ import QtQuick.Controls.Styles 1.4
Page {
id: dapUiQmlScreenDashboard
title: qsTr("General")
Rectangle {
id: rectangleTabs
anchors.top: parent.top
......@@ -20,7 +21,7 @@ Page {
ListModel {
id: listModelTabs
ListElement {
name: qsTr("Home")
page: "DapUiQmlScreenDialog.qml"
......@@ -37,21 +38,21 @@ Page {
source: "qrc:/Resources/Icons/about.png"
}
}
delegate:
delegate:
Component {
id: componentTab
Item {
id: componentItem
width: listViewTabs.width
width: listViewTabs.width
height: 64
Column
{
anchors.centerIn: parent
Image
{
Image
{
id: imageMenu
source: model.source
height: 36
......@@ -65,10 +66,10 @@ Page {
anchors.horizontalCenter: parent.horizontalCenter
}
}
MouseArea {
anchors.fill: parent
onClicked:
onClicked:
{
listViewTabs.currentIndex = index
stackViewScreenDashboard.setSource(Qt.resolvedUrl(page))
......@@ -76,26 +77,79 @@ Page {
}
}
}
// highlight: Rectangle { color: "aliceblue"; radius: 1 }
highlight:
Component
highlight:
Component
{
Rectangle {
id: rectangleMenu
color: "#121B28"
Rectangle
{
Rectangle
{
height: rectangleMenu.height
width: 4
color: "#EE5321"
color: "green"
}
}
}
focus: true
}
}
Rectangle {
Rectangle
{
id: rectangleExit
color: "transparent"
width: listViewTabs.width
height: 64
anchors.left: parent.left
anchors.bottom: parent.bottom
Rectangle
{
color: "transparent"
width: listViewTabs.width
height: 64
anchors.left: parent.left
anchors.bottom: parent.bottom
Rectangle
{
id: rectangleBorder
anchors.left: parent.left
height: rectangleExit.height
width: 4
color: "transparent"
}
Column
{
anchors.centerIn: parent
Image
{
id: imageMenu
source: "qrc:/Resources/Icons/home.png"
height: 36
width: 36
anchors.horizontalCenter: parent.horizontalCenter
}
Text
{
text: qsTr("Exit")
color: "#BBBEBF"
anchors.horizontalCenter: parent.horizontalCenter
}
}
MouseArea {
anchors.fill: parent
onClicked:
{
rectangleBorder.color = "#EE5321"
}
}
}
}
Rectangle {
id: mainDashboard
anchors.left: rectangleTabs.right
anchors.top: parent.top
anchors.bottom: parent.bottom
......
......@@ -2,6 +2,7 @@ import QtQuick 2.9
import QtQuick.Controls 1.4
import QtQuick.Controls 2.4
import QtQuick.Window 2.0
import QtQuick.Controls.Styles 1.3
import QtQuick.Controls.Styles 1.4
import Qt.labs.platform 1.0
import KelvinDashboard 1.0
......@@ -46,64 +47,102 @@ ApplicationWindow {
}
header: ToolBar {
contentHeight: buttomMenu.implicitHeight
spacing: 20
ToolButton {
id: buttomMenu
text: stackView.depth > 1 ? "\u25C0" : "\u2630"
font.pixelSize: Qt.application.font.pixelSize * 1.6
onClicked: {
if (stackView.depth > 1) {
stackView.pop()
} else {
drawerMenu.open()
header:
Column
{
ToolBar
{
width: parent.width
height: buttomMenu.implicitHeight
contentItem: Item {
anchors.fill: parent
Rectangle
{
anchors.fill: parent
color: "#353841"
}
}
ToolButton {
id: buttomMenu
contentItem: Item {
anchors.fill: parent
Rectangle
{
anchors.fill: parent
color: "#353841"
Text {
text: stackView.depth > 1 ? "\u25C0" : "\u2630"
font.pixelSize: Qt.application.font.pixelSize * 2
anchors.centerIn: parent
color: "#A5A7AA"
}
}
}
onClicked: {
if (stackView.depth > 1) {
stackView.pop()
} else {
drawerMenu.open()
}
}
}
Label {
id: labelTitleWidget
text: stackView.currentItem.title
anchors.centerIn: parent
color: "white"
}
Image {
id: imageNetwork
source: "qrc:/Resources/Icons/iconNetwork.png"
scale: 0.7
visible: false
anchors.verticalCenter: parent.verticalCenter
anchors.right: imageDollars.left
}
Image {
id: imageErrorNetwork
source: "qrc:/Resources/Icons/iconErrorNetwork.png"
scale: 0.7
visible: true
anchors.verticalCenter: parent.verticalCenter
anchors.right: imageDollars.left
}
Image {
id: imageDollars
source: "qrc:/Resources/Icons/dollar.png"
scale: 0.7
visible: true
anchors.verticalCenter: parent.verticalCenter
anchors.right: labelBalance.right
anchors.leftMargin: 5
anchors.rightMargin: 5
}
Text {
id: labelBalance
text: "0"
font.pointSize: 16
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 10
}
}
Label {
id: labelTitleWidget
text: stackView.currentItem.title
anchors.centerIn: parent
}
Image {
id: imageNetwork
source: "qrc:/Resources/Icons/iconNetwork.png"
scale: 0.7
visible: false
anchors.verticalCenter: parent.verticalCenter
anchors.right: imageDollars.left
}
Image {
id: imageErrorNetwork
source: "qrc:/Resources/Icons/iconErrorNetwork.png"
scale: 0.7
visible: true
anchors.verticalCenter: parent.verticalCenter
anchors.right: imageDollars.left
}
Image {
id: imageDollars
source: "qrc:/Resources/Icons/dollar.png"
scale: 0.7
visible: true
anchors.verticalCenter: parent.verticalCenter
anchors.right: labelBalance.right
anchors.leftMargin: 5
anchors.rightMargin: 5
}
Text {
id: labelBalance
text: "0"
font.pointSize: 16
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 10
Rectangle
{
height: 1
width: parent.width
color: "green"
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment