From ba65d921e8d2b2cb5bffe9ebb6572da4c7e50703 Mon Sep 17 00:00:00 2001 From: marcin Date: Tue, 15 Jul 2014 16:03:39 +0200 Subject: [PATCH] new title bar + fixed payment id width on transfer page. https://trello.com/c/U0nxQ9vy/32-payment-id-field-in-transfer-tab-needs-to-be-much-longer https://trello.com/c/r755XHXq/36-move-window-control-icons-to-left-hand-side-as-discussed-once-qml-is-all-done-we-will-see-how-everyone-reacts-to-it --- RightPanel.qml | 7 - bitmonero.pro.user | 2 +- components/TitleBar.qml | 210 ++++++++++++----------------- images/backToWindowIcon.png | Bin 233 -> 231 bytes images/backToWindowIconHovered.png | Bin 239 -> 0 bytes images/closeIcon.png | Bin 238 -> 249 bytes images/helpIcon.png | Bin 220 -> 319 bytes images/helpIconHovered.png | Bin 220 -> 0 bytes images/maximizeIcon.png | Bin 212 -> 208 bytes images/maximizeIconHovered.png | Bin 215 -> 0 bytes images/minimizeIcon.png | Bin 198 -> 198 bytes images/minimizeIconHovered.png | Bin 198 -> 0 bytes main.qml | 25 ++++ pages/Transfer.qml | 16 ++- qml.qrc | 6 +- 15 files changed, 125 insertions(+), 141 deletions(-) delete mode 100644 images/backToWindowIconHovered.png delete mode 100644 images/helpIconHovered.png delete mode 100644 images/maximizeIconHovered.png delete mode 100644 images/minimizeIconHovered.png diff --git a/RightPanel.qml b/RightPanel.qml index fc05ab8f..618e92e4 100644 --- a/RightPanel.qml +++ b/RightPanel.qml @@ -7,13 +7,6 @@ import "components" Rectangle { width: 330 - TitleBar { - anchors.top: parent.top - anchors.right: parent.right - anchors.topMargin: 5 - anchors.rightMargin: 5 - } - TabView { id: tabView anchors.left: parent.left diff --git a/bitmonero.pro.user b/bitmonero.pro.user index 65e23426..297eefb7 100644 --- a/bitmonero.pro.user +++ b/bitmonero.pro.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget diff --git a/components/TitleBar.qml b/components/TitleBar.qml index 46171a31..caefff5a 100644 --- a/components/TitleBar.qml +++ b/components/TitleBar.qml @@ -1,140 +1,104 @@ import QtQuick 2.2 import QtQuick.Window 2.0 -Row { - Rectangle { - width: 25 - height: 25 - radius: 5 - clip: true - color: helpArea.containsMouse ? "#DBDBDB" : "#FFFFFF" - - Rectangle { - width: 25 - height: 25 - radius: 5 - color: "#FFFFFF" - visible: helpArea.containsMouse - x: 1; y: 2 - } - - Image { - anchors.centerIn: parent - source: { - if(appWindow.whatIsEnable) - return "../images/whatIsIcon.png" - return helpArea.containsMouse ? "../images/helpIconHovered.png" : - "../images/helpIcon.png" - } - } - - MouseArea { - id: helpArea - anchors.fill: parent - hoverEnabled: true - onClicked: appWindow.whatIsEnable = !appWindow.whatIsEnable - } +Rectangle { + id: titleBar + height: 30 + color: "#000000" + y: -height + property int mouseX: 0 + property int mouseY: 0 + + Behavior on y { + NumberAnimation { duration: 100; easing.type: Easing.InQuad } } - - Rectangle { - width: 25 - height: 25 - radius: 5 - clip: true - color: minimizeArea.containsMouse ? "#DBDBDB" : "#FFFFFF" - + + Row { + id: row + anchors.right: parent.right + anchors.top: parent.top + anchors.bottom: parent.bottom + Rectangle { - width: 25 - height: 25 - radius: 5 - color: "#FFFFFF" - visible: minimizeArea.containsMouse - x: 1; y: 2 - } - - Image { - anchors.centerIn: parent - source: minimizeArea.containsMouse ? "../images/minimizeIconHovered.png" : - "../images/minimizeIcon.png" - } - - MouseArea { - id: minimizeArea - anchors.fill: parent - hoverEnabled: true - onClicked: { - appWindow.visible = false - appWindow.visibility = Window.Minimized + property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width + anchors.top: parent.top + anchors.bottom: parent.bottom + width: height + color: appWindow.whatIsEnable || containsMouse ? "#6B0072" : "#000000" + + Image { + anchors.centerIn: parent + source: "../images/helpIcon.png" + } + + MouseArea { + id: whatIsArea + anchors.fill: parent + onClicked: appWindow.whatIsEnable = !appWindow.whatIsEnable } } - } - - Rectangle { - property bool checked: false - width: 25 - height: 25 - radius: 5 - clip: true - color: maximizeArea.containsMouse ? "#DBDBDB" : "#FFFFFF" - + Rectangle { - width: 25 - height: 25 - radius: 5 - color: "#FFFFFF" - visible: maximizeArea.containsMouse - x: 1; y: 2 - } - - Image { - anchors.centerIn: parent - source: { - if(parent.checked) - return maximizeArea.containsMouse ? "../images/backToWindowIconHovered.png" : - "../images/backToWindowIcon.png" - return maximizeArea.containsMouse ? "../images/maximizeIconHovered.png" : - "../images/maximizeIcon.png" + property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width + anchors.top: parent.top + anchors.bottom: parent.bottom + width: height + color: containsMouse ? "#3665B3" : "#000000" + + Image { + anchors.centerIn: parent + source: "../images/minimizeIcon.png" + } + + MouseArea { + id: minimizeArea + anchors.fill: parent + onClicked: appWindow.visibility = Window.Minimized } } + + Rectangle { + property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width + anchors.top: parent.top + anchors.bottom: parent.bottom + width: height + color: containsMouse ? "#FF6C3C" : "#000000" + property bool checked: false + + Image { + anchors.centerIn: parent + source: parent.checked ? "../images/backToWindowIcon.png" : + "../images/maximizeIcon.png" - MouseArea { - id: maximizeArea - anchors.fill: parent - hoverEnabled: true - onClicked: { - parent.checked = !parent.checked - appWindow.visibility = parent.checked ? Window.FullScreen : - Window.Windowed + } + + MouseArea { + id: maximizeArea + hoverEnabled: true + onClicked: { + parent.checked = !parent.checked + appWindow.visibility = parent.checked ? Window.FullScreen : + Window.Windowed + } } } - } - - Rectangle { - width: 25 - height: 25 - radius: 5 - clip: true - color: closeArea.containsMouse ? "#DBDBDB" : "#FFFFFF" - + Rectangle { - width: 25 - height: 25 - radius: 5 - color: "#FFFFFF" - visible: closeArea.containsMouse - x: 1; y: 2 - } - - Image { - anchors.centerIn: parent - source: "../images/closeIcon.png" - } - - MouseArea { - id: closeArea - anchors.fill: parent - hoverEnabled: true - onClicked: Qt.quit() + property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width + anchors.top: parent.top + anchors.bottom: parent.bottom + width: height + color: containsMouse ? "#E04343" : "#000000" + + Image { + anchors.centerIn: parent + source: "../images/closeIcon.png" + } + + MouseArea { + anchors.fill: parent + onClicked: Qt.quit() + } } } } diff --git a/images/backToWindowIcon.png b/images/backToWindowIcon.png index 7d1c3a6e074131947404535412333ee1af56dddf..ed214147eee886999295d3b418dcc17aa53484fa 100644 GIT binary patch delta 163 zcmaFK_?%I(Gr-TCmrII^fq{Y7)59eQM1wE~8;~q|{iJ51qQ=B*jWV$k*N775qSVBa z%=|oskj&gv1_N__LsNZ2lk=OtngA8sd%8G=XiQB0^Z&m+v(y0r2X>zpkpyO)h$9jo zSN!*%=*#lAAxhvGr-TCmrII^fq{Y7)59eQNQ2m19Be?c*XaD-iHaH%3&l7MO!N&+yz+KG zoam+<=IH6-7$PzC=!A{D2Ml-)uQ>33{~12d2EN?8y0c6IOdhOYP?`Bu_2vWhDG_r$ vc@JciYL~{_&b{+@`$vHl%NEp|9bo-`N<{p@rkrCyOBg&|{an^LB{Ts5!0R-I diff --git a/images/backToWindowIconHovered.png b/images/backToWindowIconHovered.png deleted file mode 100644 index 4a27a0c69d7592457b0d149cbd0bbbaff40e8054..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 239 zcmeAS@N?(olHy`uVBq!ia0vp^AT}2V8<6ZZI=>f4u@pObhHwBu4M$1`kk47*5n0T@ zz%2yAjF;}#{Q(M!mAFQfI2WZRmSpDVDTHL^rZO0q>l>Kp8=83K?S2SUAp=qooS#-w zo>-L1;Fyx1l&avCS(I9yUzA;};2doBV$Y@?pgMO?7sn8ZsmXu-|F>rb0q1qPQyOIr z4v9Wu-ns36B*)An20smyK{CRLj};nNBgM_M6MYu>%4oDs<~Me-an|UNkdR=Q)+Us? TMZ56~&`1VPS3j3^P6)nwGr-TCmrII^fq{Y7)59eQNQ2m19Be?c*XaD-iHaH%vo-3)N?apKoQqNu zOEUBG6hbm{QyC1*^$kt+4NcB(`f37H9O&ud7$Pxs>IFxx0|p!}fiF9YT4Yqe$A4v8 zKf7htg;rUCmY<9K7Cd%ymbtp@da{|_gK2vYe8@T|*|c$)e?_yv&v`ug0*|^@{ad4F gAKbTGNJrGr-TCmrII^fq{Y7)59eQNOJ%&I|mz(G>znmo2aNUu~3ZDz)0WFB%k$( z?L;^2Xg5z6#}JO0$$#c2f1ck61c{##-PlqlWd8>9IQ1As9TNTR&Ybx1|9?Fj537fo t(L(M8n+3TxL^6gqq^R$jEy4MdiD6!)a;O?l?_Z!z44$rjF6*2UngDMOFH8Uc diff --git a/images/helpIcon.png b/images/helpIcon.png index 373e6cca8d2da485546122599f86de6005f10785..51661e33afd2ebd19d2df1989381b8504d09ca7e 100644 GIT binary patch delta 251 zcmVWdJZYFEKSQF*MJz^)vtg0GCNbK~xx(h0i@|f?*H@;8E-> zq87nZqzaZ^KuF;Myp)~2N5}>2grrKDLqr=1A@bPl3tuGSz_QHG?y^BJ!w$bV;|&WW zc*4p5SO%{}-YY!Cy0p*WyU25$3m#9~ieOaLD?Y@w{Eu{|f(Pu&{K5P>u<4jD?Tc<5 zDzIu=59y$hNs_N58RRd<)sIcMwPBp(kR<)w!38>3=@Hb#WM2RP002ovPDHLkV1lMd BXf*%; delta 130 zcmdnbbca!)Gr-TCmrII^fq{Y7)59eQNV5SkCkKcWoE1A!L33iE7^i`ezM)Az>l53F zZrYwEo-U3d95a(s5)u+FgoXb;-@vl&-kzf;IE439eHK&Rq~ykC(y&fiuS2m>??lVO e-VBE=fehJ)g%21B|A_+{%i!ti=d#Wzp$P!zm?&ug diff --git a/images/helpIconHovered.png b/images/helpIconHovered.png deleted file mode 100644 index 164762637cd0a34533dc09f525ced03a9f701cee..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 220 zcmeAS@N?(olHy`uVBq!ia0vp^Y(UJ(0U`xw#m)s%EX7WqAsj$Z!;#Vfk}U9uEM{Qf z76M_$OLy!300qTLTq8=Hi&7IyGV}8kLNaqx84S$z4UF^+P4Zcv*aB6^fK&wMr8~FGN-6TFj7#NS<2x$ulSJ(4&o_?F1VQ}+|pn;WF>1cBT#53P(OpGtDnm{r-UW| D!5KYx diff --git a/images/maximizeIcon.png b/images/maximizeIcon.png index 177c20c5771cee9bf04526d32d924f7d299ceb67..a8ee06e495e9fbd0fa86055faf85485c23b86358 100644 GIT binary patch delta 119 zcmcb@c!6<(I2RWO8v_GFuhIFv6BRWkW^2TYmAFQfI2WZRmSpDVDTHL^rZO0q>l>Qt z8=9Qo^wk8YSi{rBF+^f&@}K|z|JSoAF$f!Wc?6wkI+Au|;WPW(HOtnfe`r&`sK&&w XHkM8J;XR+DKs^keu6{1-oD!ML0n`DI7YYan1^@s6!1`{sks&CNaTW(ToUaD4^XbiaR2}S07*qo IM6N<$f)RivGXMYp diff --git a/images/maximizeIconHovered.png b/images/maximizeIconHovered.png deleted file mode 100644 index 92a3a2ab41cec38f5b5485477d9cc3891eb4845a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^AT|dF8<0HkD{mW+Vkvg=4B-HR8jh3>AfL0qBeIx* zfm;ZK886+f`vVjdD{+k|aV|-L1;Fyx1l&avCS(I9yUzA;};2doBV$Y@?pgMg|7sn8ZsmXulCx4#b$Z^1>M~Mvx w#6U#b$#%()t4?kG>%XOwdBuc@Hy$uDWbWmN-7#xLI8ZBtr>mdKI;Vst0K98J8vp`Op9V_RNM2of@IaVT#<$%*=s| co?AK@l*?I!HXK>_2dI+4)78&qol`;+0Dws(f&c&j delta 109 zcmX@cc#Ki8Gr-TCmrII^fq{Y7)59eQNOOQN2OE$)!oRP3qN2vcLNQJQBYi`YeAXwn z6Wz3pLLakmTV`I&0h++z>FVdQ I&MBb@0N5)Z5dZ)H diff --git a/images/minimizeIconHovered.png b/images/minimizeIconHovered.png deleted file mode 100644 index 8d7ac3552304fcb09bc7531098fea81e45121de8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 198 zcmeAS@N?(olHy`uVBq!ia0vp^93afW1|*O0@9PFqEX7WqAsj$Z!;#Vf4nJ za0`Jj!}Pi%oIWI!r{^V3So z6N^$A98>a>QWe}Xi&D$;i?WLqoP*6??Ag=!!J~Oy7Yj89ZJ6T-G@yGywoYlsGv6 diff --git a/main.qml b/main.qml index ef9191ba..47af11ae 100644 --- a/main.qml +++ b/main.qml @@ -140,5 +140,30 @@ ApplicationWindow { visible: false z: 100 } + + MouseArea { + id: frameArea + anchors.top: parent.top + anchors.left: parent.left + anchors.right: parent.right + height: 30 + z: 1 + hoverEnabled: true + onEntered: titleBar.y = 0 + onExited: titleBar.y = -titleBar.height + propagateComposedEvents: true + onPressed: mouse.accepted = false + onReleased: mouse.accepted = false + onMouseXChanged: { + titleBar.mouseX = mouseX + titleBar.mouseY = mouseY + } + } + + TitleBar { + id: titleBar + anchors.left: parent.left + anchors.right: parent.right + } } } diff --git a/pages/Transfer.qml b/pages/Transfer.qml index bc0198c2..8fa3cd57 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -119,18 +119,24 @@ Rectangle { text: qsTr("Payment ID ( Optional )") } - Row { + LineEdit { + id: paymentLine anchors.left: parent.left anchors.right: parent.right anchors.top: paymentLabel.bottom anchors.leftMargin: 17 anchors.rightMargin: 17 anchors.topMargin: 5 - spacing: 17 + } - LineEdit { - width: parent.width - (checkBox.width + sendButton.width + 2 * parent.spacing) - } + Row { + anchors.left: parent.left + anchors.right: parent.right + anchors.top: paymentLine.bottom + anchors.leftMargin: 17 + anchors.rightMargin: 17 + anchors.topMargin: 17 + spacing: 17 StandardButton { id: sendButton diff --git a/qml.qrc b/qml.qrc index e89c6d49..21a79120 100644 --- a/qml.qrc +++ b/qml.qrc @@ -8,9 +8,6 @@ images/helpIcon.png images/maximizeIcon.png images/minimizeIcon.png - images/helpIconHovered.png - images/maximizeIconHovered.png - images/minimizeIconHovered.png images/moneroLogo.png components/Label.qml images/whatIsIcon.png @@ -41,7 +38,6 @@ images/descSortIndicatorActived.png images/descSortIndicatorPressed.png images/backToWindowIcon.png - images/backToWindowIconHovered.png components/DashboardTable.qml components/TableDropdown.qml images/tableOptions.png @@ -69,7 +65,7 @@ images/datePicker.png images/nextMonth.png images/prevMonth.png - components/TitleBar.qml components/TickDelegate.qml + components/TitleBar.qml