From aec65db8c3919692a6243458af18d087f6385f50 Mon Sep 17 00:00:00 2001 From: Jaquee Date: Tue, 8 Aug 2017 10:48:06 +0200 Subject: [PATCH] add mobile menu --- components/TitleBar.qml | 9 ++++++--- images/menu.png | Bin 0 -> 1609 bytes qml.qrc | 1 + 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 images/menu.png diff --git a/components/TitleBar.qml b/components/TitleBar.qml index 8f147322..531d5196 100644 --- a/components/TitleBar.qml +++ b/components/TitleBar.qml @@ -28,6 +28,7 @@ import QtQuick 2.2 import QtQuick.Window 2.0 +import QtQuick.Layouts 1.1 Rectangle { id: titleBar @@ -53,6 +54,7 @@ Rectangle { } Rectangle { + id: goToBasicVersionButton property bool containsMouse: titleBar.mouseX >= x && titleBar.mouseX <= x + width property bool checked: false @@ -64,10 +66,10 @@ Rectangle { visible: isMobile Image { + width: parent.width * 2/3; + height: width; anchors.centerIn: parent - rotation: !leftPanel.visible ? 180 : 0 - source: parent.customDecorations || !leftPanel.visible ? "../images/goToBasicVersionHovered.png" : - "../images/gotoBasicVersion.png" + source: "../images/menu.png" } MouseArea { @@ -75,6 +77,7 @@ Rectangle { hoverEnabled: true anchors.fill: parent onClicked: { + releaseFocus() parent.checked = !parent.checked titleBar.goToBasicVersion(leftPanel.visible) } diff --git a/images/menu.png b/images/menu.png new file mode 100644 index 0000000000000000000000000000000000000000..95378c694e9a383924e7ccd7477d78ad016888d0 GIT binary patch literal 1609 zcmeAS@N?(olHy`uVBq!ia0vp^DImc-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxR5#hc$WX!DQqR!T z)ZE-iN5ROz&_v(BP~Xs4*U-|+#Kg+LKmiJrfVLH-q*(>IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%gnI^o@*kfhu&1EAvVcD|GXUm0>2hq!uR^WfqiV=I1GZOiWD5 zFD$Tv3bSNU;+l1ennz|zM-B0$V)JVzP|XC=H|jx7ncO3BHWAB;NpiyW)Z+ZoqGVvir744~DzI`cN=+=uFAB-e&w+(vKt_H^esM;Afr7I$IMft0d=ry1 z^FV@{U|qhxR-SpqC5d^-sh%#jN!6x}c(U>X83;fWW>fhYgeJYbqH0w!+P5(_Z~2Bz(v zE{-7;x8BV4_LFuLXv?mUVUP*4;C4Rb*x+$e^pJAHq-fQG?v%!}j!si_lH|G?g^$e0 zTE@Qp*yBc*vmyHX{C}}F#n!$GEce|xx7SU%vE+n6lYj$<6N4fLV~YX{kh7`*#DB2A zH6>E)-`lCr95%1Z%zkDX(H)Y1Hr_Y>@@1J!zwY{b`hAzUZeEV5Vtn$m_+@sSX3BJ? znW@`#Qe2CD6VDVajx5zn`}69@lE^25`Nx``E&jb!V3VWonVUSVI>G$K)0`C(&TEKV zS}yl&POFpOigwGr9}``cEZ&*)J5#Lu$%`rcZSPH;yDnG6oZY@`t6y1!X796A7E8sQ zR?X^`t@o&09eL@@r;7etF(ukb3w|#9x#s8B855Y)7cHH+xGzxh*HptfH@=72Y&!5s zp-G^H!AXFL!;wRQMX^Bu=tac<^(E_ezPP8h>!QN0y@flc*6?Nj2vN+QReM(YWO}u6 zmPEOthuz@|S7oyHUANtI=k%n;506%?kev?n2hcYT zb0-|v-|F{}IItnPQ-2kX55RSKBj{+;Z^ rp_0M_Pd|{vw2%vyo;uFXWngBAJD$s|y|Kg(RJeP(`njxgN@xNA-8NdI literal 0 HcmV?d00001 diff --git a/qml.qrc b/qml.qrc index a8ba7c87..7f1b3c37 100644 --- a/qml.qrc +++ b/qml.qrc @@ -147,5 +147,6 @@ wizard/WizardDaemonSettings.qml components/RemoteNodeEdit.qml pages/Keys.qml + images/menu.png