Refactor drawer properties to be more aesthetic

This commit is contained in:
Angela Mazzurco 2017-07-09 13:11:48 +02:00
parent 7653cfa008
commit 80dd0006e7
3 changed files with 19 additions and 15 deletions

View File

@ -6,6 +6,7 @@ Item
id: button id: button
property alias buttonText: innerText.text; property alias buttonText: innerText.text;
property alias buttonTextPixelSize: innerText.font.pixelSize
property alias innerAnchors: innerElements.anchors; property alias innerAnchors: innerElements.anchors;
property alias rectangleButton: rectangleButton; property alias rectangleButton: rectangleButton;

View File

@ -57,7 +57,7 @@ Drawer
Text Text
{ {
id: nickText id: nickText
text: (ChatCache.contactsCache.own)?ChatCache.contactsCache.own.name : "" text: (ChatCache.contactsCache.own)?ChatCache.contactsCache.own.name : "Retroshare"
height: contentHeight height: contentHeight
anchors.top: colorHash.bottom anchors.top: colorHash.bottom
anchors.left: header.left anchors.left: header.left
@ -122,6 +122,7 @@ Drawer
innerAnchors.verticalCenter: rectangleButton.verticalCenter innerAnchors.verticalCenter: rectangleButton.verticalCenter
iconUrl: (model.icon)? model.icon : undefined iconUrl: (model.icon)? model.icon : undefined
innerMargin: 20 innerMargin: 20
buttonTextPixelSize: menuItem.styles.pixelSize
} }
@ -178,14 +179,14 @@ Drawer
property var actions : property var actions :
{ {
"Contacts": function()
{
stackView.push("qrc:/Contacts.qml" )
},
"Trusted Nodes": function() "Trusted Nodes": function()
{ {
stackView.push("qrc:/TrustedNodesView.qml"); stackView.push("qrc:/TrustedNodesView.qml");
}, },
"Search Contacts": function()
{
stackView.push("qrc:/Contacts.qml" )
},
"Paste Link": function() "Paste Link": function()
{ {
UriJs.URI.withinString( UriJs.URI.withinString(
@ -195,9 +196,15 @@ Drawer
"Terminate Core": function() "Terminate Core": function()
{ {
rsApi.request("/control/shutdown"); rsApi.request("/control/shutdown");
}, }
} }
ListElement
{
title: "Contacts"
showOnCoreReady: true
icon: "/icons/search.svg"
}
ListElement ListElement
{ {
title: "Trusted Nodes" title: "Trusted Nodes"
@ -205,12 +212,6 @@ Drawer
icon: "/icons/netgraph.svg" icon: "/icons/netgraph.svg"
} }
ListElement ListElement
{
title: "Search Contacts"
showOnCoreReady: true
icon: "/icons/search.svg"
}
ListElement
{ {
title: "Paste Link" title: "Paste Link"
showOnCoreReady: true showOnCoreReady: true
@ -242,7 +243,7 @@ Drawer
horizontalAlignment: Text.AlignRight horizontalAlignment: Text.AlignRight
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
anchors.right: parent.right anchors.right: parent.right
text:"Retroshare v.DEV" text: parent.styles.text
color: parent.styles.textColor color: parent.styles.textColor
anchors.rightMargin: parent.styles.margins anchors.rightMargin: parent.styles.margins
anchors.bottomMargin: parent.styles.margins anchors.bottomMargin: parent.styles.margins

View File

@ -3,15 +3,16 @@ pragma Singleton
QtObject { QtObject {
property var width: 1.5 property var width: 2 // Number of third parts of screen (for example 2/3)
property QtObject item: QtObject property QtObject item: QtObject
{ {
property var height: 40 property var height: 50
property string hoverColor: "lightgrey" property string hoverColor: "lightgrey"
property string defaultColor: "white" property string defaultColor: "white"
property string pressColor: "slategrey" property string pressColor: "slategrey"
property int pixelSize: 14
} }
property QtObject header: QtObject property QtObject header: QtObject
{ {
@ -27,6 +28,7 @@ QtObject {
property var color: "white" property var color: "white"
property var textColor: "grey" property var textColor: "grey"
property var margins: 8 property var margins: 8
property string text: "Retroshare Dev Version"
} }
} }