Style sidebar

This commit is contained in:
Angela Mazzurco 2017-06-22 18:05:04 +02:00
parent 69b3f46309
commit ac25a4d23a
3 changed files with 10 additions and 14 deletions

View File

@ -18,6 +18,7 @@ Item
property int fontSize property int fontSize
property int borderWidth property int borderWidth
property int borderRadius property int borderRadius
property int innerMargin: 10
scale: state === "Pressed" ? 0.96 : 1.0 scale: state === "Pressed" ? 0.96 : 1.0
onEnabledChanged: state = "" onEnabledChanged: state = ""
@ -42,16 +43,18 @@ Item
height: (iconUrl)? iconHeight: 0 height: (iconUrl)? iconHeight: 0
width: (iconUrl)? iconHeight: 0 width: (iconUrl)? iconHeight: 0
fillMode: Image.PreserveAspectFit
visible: (iconUrl)? true: false visible: (iconUrl)? true: false
anchors.left: innerElements.left anchors.left: innerElements.left
anchors.margins:(iconUrl)? 10 : 0 anchors.margins:(iconUrl)? innerMargin : 0
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
Text Text
{ {
anchors.margins: 10 anchors.margins: innerMargin
id: innerText id: innerText
font.pointSize: fontSize font.pointSize: fontSize
anchors.left: icon.right anchors.left: icon.right

View File

@ -74,6 +74,7 @@ Drawer
innerAnchors.left: rectangleButton.left innerAnchors.left: rectangleButton.left
innerAnchors.verticalCenter: rectangleButton.verticalCenter innerAnchors.verticalCenter: rectangleButton.verticalCenter
iconUrl: (model.icon)? model.icon : undefined iconUrl: (model.icon)? model.icon : undefined
innerMargin: 20
} }
@ -134,11 +135,6 @@ Drawer
{ {
stackView.push("qrc:/TrustedNodesView.qml"); stackView.push("qrc:/TrustedNodesView.qml");
}, },
"Search Contacts": function(){
stackView.push("qrc:/Contacts.qml",
{'searching': true} )
},
"Paste Link": function() "Paste Link": function()
{ {
UriJs.URI.withinString( UriJs.URI.withinString(
@ -155,22 +151,19 @@ Drawer
{ {
title: "Trusted Nodes" title: "Trusted Nodes"
showOnCoreReady: true showOnCoreReady: true
icon: "/icons/attach.svg" icon: "/icons/netgraph.svg"
}
ListElement
{
title: "Search Contacts"
showOnCoreReady: true
} }
ListElement ListElement
{ {
title: "Paste Link" title: "Paste Link"
showOnCoreReady: true showOnCoreReady: true
icon: "/icons/add.svg"
} }
ListElement ListElement
{ {
title: "Terminate Core" title: "Terminate Core"
showOnOsAndroid: false showOnOsAndroid: false
icon: "/icons/exit.svg"
} }
} }

View File

@ -7,7 +7,7 @@ QtObject {
property QtObject item: QtObject property QtObject item: QtObject
{ {
property var height: 50 property var height: 40
property string hoverColor: "lightgrey" property string hoverColor: "lightgrey"
property string defaultColor: "white" property string defaultColor: "white"