From 80dd0006e731e0b4a8bebcc1b8a449716b7b01c7 Mon Sep 17 00:00:00 2001 From: Angela Mazzurco Date: Sun, 9 Jul 2017 13:11:48 +0200 Subject: [PATCH] Refactor drawer properties to be more aesthetic --- retroshare-qml-app/src/components/Btn.qml | 1 + retroshare-qml-app/src/components/SideBar.qml | 27 ++++++++++--------- .../src/styles/SideBarStyle.qml | 6 +++-- 3 files changed, 19 insertions(+), 15 deletions(-) diff --git a/retroshare-qml-app/src/components/Btn.qml b/retroshare-qml-app/src/components/Btn.qml index 26626a5aa..6af29ac74 100644 --- a/retroshare-qml-app/src/components/Btn.qml +++ b/retroshare-qml-app/src/components/Btn.qml @@ -6,6 +6,7 @@ Item id: button property alias buttonText: innerText.text; + property alias buttonTextPixelSize: innerText.font.pixelSize property alias innerAnchors: innerElements.anchors; property alias rectangleButton: rectangleButton; diff --git a/retroshare-qml-app/src/components/SideBar.qml b/retroshare-qml-app/src/components/SideBar.qml index 790e1fb54..0361c23eb 100644 --- a/retroshare-qml-app/src/components/SideBar.qml +++ b/retroshare-qml-app/src/components/SideBar.qml @@ -57,7 +57,7 @@ Drawer Text { id: nickText - text: (ChatCache.contactsCache.own)?ChatCache.contactsCache.own.name : "" + text: (ChatCache.contactsCache.own)?ChatCache.contactsCache.own.name : "Retroshare" height: contentHeight anchors.top: colorHash.bottom anchors.left: header.left @@ -122,6 +122,7 @@ Drawer innerAnchors.verticalCenter: rectangleButton.verticalCenter iconUrl: (model.icon)? model.icon : undefined innerMargin: 20 + buttonTextPixelSize: menuItem.styles.pixelSize } @@ -178,14 +179,14 @@ Drawer property var actions : { + "Contacts": function() + { + stackView.push("qrc:/Contacts.qml" ) + }, "Trusted Nodes": function() { stackView.push("qrc:/TrustedNodesView.qml"); }, - "Search Contacts": function() - { - stackView.push("qrc:/Contacts.qml" ) - }, "Paste Link": function() { UriJs.URI.withinString( @@ -195,9 +196,15 @@ Drawer "Terminate Core": function() { rsApi.request("/control/shutdown"); - }, + } } + ListElement + { + title: "Contacts" + showOnCoreReady: true + icon: "/icons/search.svg" + } ListElement { title: "Trusted Nodes" @@ -205,12 +212,6 @@ Drawer icon: "/icons/netgraph.svg" } ListElement - { - title: "Search Contacts" - showOnCoreReady: true - icon: "/icons/search.svg" - } - ListElement { title: "Paste Link" showOnCoreReady: true @@ -242,7 +243,7 @@ Drawer horizontalAlignment: Text.AlignRight anchors.bottom: parent.bottom anchors.right: parent.right - text:"Retroshare v.DEV" + text: parent.styles.text color: parent.styles.textColor anchors.rightMargin: parent.styles.margins anchors.bottomMargin: parent.styles.margins diff --git a/retroshare-qml-app/src/styles/SideBarStyle.qml b/retroshare-qml-app/src/styles/SideBarStyle.qml index 491bdf3c2..1ebe90244 100644 --- a/retroshare-qml-app/src/styles/SideBarStyle.qml +++ b/retroshare-qml-app/src/styles/SideBarStyle.qml @@ -3,15 +3,16 @@ pragma Singleton 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 var height: 40 + property var height: 50 property string hoverColor: "lightgrey" property string defaultColor: "white" property string pressColor: "slategrey" + property int pixelSize: 14 } property QtObject header: QtObject { @@ -27,6 +28,7 @@ QtObject { property var color: "white" property var textColor: "grey" property var margins: 8 + property string text: "Retroshare Dev Version" } }