From ca7472c79af2fe27cafceeb866cc729a171a78fc Mon Sep 17 00:00:00 2001 From: marcin Date: Wed, 16 Jul 2014 10:24:59 +0200 Subject: hide/show right panel https://trello.com/c/BjPPAZfw/35-ability-to-hide-right-sidebar-as-discussed --- LeftPanel.qml | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'LeftPanel.qml') diff --git a/LeftPanel.qml b/LeftPanel.qml index 74e2cadb..09438de1 100644 --- a/LeftPanel.qml +++ b/LeftPanel.qml @@ -24,19 +24,40 @@ Rectangle { width: 260 color: "#FFFFFF" - Image { - id: logo - anchors.horizontalCenter: parent.horizontalCenter + Item { + id: logoItem + anchors.left: parent.left + anchors.right: parent.right anchors.top: parent.top anchors.topMargin: 31 - source: "images/moneroLogo.png" + height: logo.implicitHeight + + Image { + id: logo + anchors.horizontalCenter: parent.horizontalCenter + source: "images/moneroLogo.png" + } + + Image { + anchors.right: logo.left + anchors.verticalCenter: logo.verticalCenter + anchors.verticalCenterOffset: 5 + anchors.rightMargin: 10 + source: appWindow.rightPanelExpanded ? "images/expandRightPanel.png" : + "images/collapseRightPanel.png" + } + + MouseArea { + anchors.fill: parent + onClicked: appWindow.rightPanelExpanded = !appWindow.rightPanelExpanded + } } Column { id: column1 anchors.left: parent.left anchors.right: parent.right - anchors.top: logo.bottom + anchors.top: logoItem.bottom anchors.topMargin: 40 spacing: 6 -- cgit v1.2.3