From 84c251398ca6efa41bade55fded249d2d937ba88 Mon Sep 17 00:00:00 2001 From: marcin Date: Tue, 22 Jul 2014 16:55:25 +0200 Subject: [PATCH] https://trello.com/c/l0lGL8QQ/52-advanced-filtering-in-history-needs-to-be-more-obviously-toggled-than-the-hyperlink-an-icon-maybe --- components/CheckBox.qml | 6 +- components/Scroll.qml | 2 +- components/TitleBar.qml | 3 +- ...{checkedIcon.png => checkedOrangeIcon.png} | Bin images/checkedVioletIcon.png | Bin 0 -> 320 bytes main.qml | 63 ++++++++++++++++++ pages/History.qml | 24 ++++--- pages/Transfer.qml | 2 + qml.qrc | 3 +- 9 files changed, 87 insertions(+), 16 deletions(-) rename images/{checkedIcon.png => checkedOrangeIcon.png} (100%) create mode 100644 images/checkedVioletIcon.png diff --git a/components/CheckBox.qml b/components/CheckBox.qml index 9cfe38b3..adc9a232 100644 --- a/components/CheckBox.qml +++ b/components/CheckBox.qml @@ -3,6 +3,8 @@ import QtQuick 2.0 Item { id: checkBox property alias text: label.text + property string checkedIcon + property string uncheckedIcon property bool checked: false signal clicked() height: 25 @@ -28,8 +30,8 @@ Item { Image { anchors.centerIn: parent - source: checkBox.checked ? "../images/checkedIcon.png" : - "../images/uncheckedIcon.png" + source: checkBox.checked ? checkBox.checkedIcon : + checkBox.uncheckedIcon } } diff --git a/components/Scroll.qml b/components/Scroll.qml index 4ab037ad..f0a3027e 100644 --- a/components/Scroll.qml +++ b/components/Scroll.qml @@ -12,7 +12,7 @@ Rectangle { y = (flickable.contentY / (flickable.contentHeight - flickable.height)) * t + yPos } - width: 12 + width: 15 height: { var t = (flickable.height * flickable.height) / flickable.contentHeight return t < 20 ? 20 : t diff --git a/components/TitleBar.qml b/components/TitleBar.qml index 28c6d89c..8e545e11 100644 --- a/components/TitleBar.qml +++ b/components/TitleBar.qml @@ -7,6 +7,7 @@ Rectangle { color: "#000000" y: -height property int mouseX: 0 + property string walletName: "Donations" property bool containsMouse: false property alias maximizeButtonVisible: maximizeButton.visible signal goToBasicVersion(bool yes) @@ -17,7 +18,7 @@ Rectangle { font.pixelSize: 15 font.letterSpacing: -1 color: "#FFFFFF" - text: qsTr("Monero") + text: qsTr("Monero - %1").arg(titleBar.walletName) } Behavior on y { diff --git a/images/checkedIcon.png b/images/checkedOrangeIcon.png similarity index 100% rename from images/checkedIcon.png rename to images/checkedOrangeIcon.png diff --git a/images/checkedVioletIcon.png b/images/checkedVioletIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..736cdd2e66d0d18d7c2c66bc1b85426fafd20724 GIT binary patch literal 320 zcmeAS@N?(olHy`uVBq!ia0vp^0zk~e!3HF=pW8M9DVAa<&kznEsNqQI0P;BtJR*x3 z7`TN%nDNrxx<5ccu@cva66d1S#FEVXJcW?V+*AewbA2NteM1w`quXPFDr7(^g7ec# z$`gxH85~pclTsDjGK*5n^NX^J6`X_3UhLV_15`J|)5S4FW8%_@r+Hfp1f1_LXt(EJ2FgZ)hX$#m(mU}JZYG2&dL~b^g7tSFo%s`yV4%RsHlZtR57&*Kf@}q1^O^z@6GYeq zLif&=dL?vEEa6z8r^r3=oK;KDHctE+xcI}$1733bzpjvvx)a`0;}N3?bR&bOtDnm{ Hr-UW|E5L8U literal 0 HcmV?d00001 diff --git a/main.qml b/main.qml index bae668a6..2d5be6f2 100644 --- a/main.qml +++ b/main.qml @@ -261,6 +261,69 @@ ApplicationWindow { } } + property int maxWidth: leftPanel.width + 655 + rightPanel.width + +// MouseArea { +// anchors.top: parent.top +// anchors.bottom: parent.bottom +// anchors.right: parent.right +// anchors.topMargin: 30 +// anchors.bottomMargin: 3 +// cursorShape: Qt.SizeHorCursor +// width: 3 +// property int previousX: 0 +// onPressed: previousX = mouseX +// onPositionChanged: { +// var diff = previousX - mouseX +// if(middlePanel.width - diff > 655) +// appWindow.width -= diff +// else appWindow.width = parent.maxWidth +// } +// } + +// MouseArea { +// anchors.left: parent.left +// anchors.top: parent.top +// anchors.bottom: parent.bottom +// anchors.topMargin: 30 +// anchors.bottomMargin: 3 +// cursorShape: Qt.SizeHorCursor +// width: 3 +// property int previousX: 0 +// property int maximumX: 0 +// onPressed: { +// var diff = appWindow.width - parent.maxWidth +// maximumX = appWindow.x + diff +// previousX = mouseX +// } +// onPositionChanged: { +// var diff = previousX - mouseX +// if(appWindow.x + diff < maximumX) { +// appWindow.width += diff +// appWindow.x -= diff +// } else { +// appWindow.width = parent.maxWidth +// appWindow.x = maximumX +// } +// } +// } + +// MouseArea { +// anchors.left: parent.left +// anchors.right: parent.right +// anchors.bottom: parent.bottom +// anchors.leftMargin: 3 +// anchors.rightMargin: 3 +// height: 3 +// cursorShape: Qt.SizeVerCursor +// property int previousY: 0 +// onPressed: previousY = mouseY +// onPositionChanged: { +// var diff = previousY - mouseY +// appWindow.height -= diff +// } +// } + TitleBar { id: titleBar anchors.left: parent.left diff --git a/pages/History.qml b/pages/History.qml index 4cdf17a0..c424ada6 100644 --- a/pages/History.qml +++ b/pages/History.qml @@ -136,18 +136,19 @@ Rectangle { pressedColor: "#4D0051" } - Text { - anchors.verticalCenter: filterButton.verticalCenter + CheckBox { + id: checkBox + text: qsTr("Advance filtering") anchors.left: filterButton.right + anchors.bottom: filterButton.bottom anchors.leftMargin: 17 - font.family: "Arial" - font.pixelSize: 12 - color: "#545454" - textFormat: Text.RichText - text: qsTr("\ - looking for Advance filtering?") - font.underline: false - onLinkActivated: tableRect.height = Qt.binding(function(){ return tableRect.collapsedHeight }) + checkedIcon: "../images/checkedVioletIcon.png" + uncheckedIcon: "../images/uncheckedIcon.png" + onClicked: { + if(checked) tableRect.height = Qt.binding(function(){ return tableRect.collapsedHeight }) + else tableRect.height = Qt.binding(function(){ return tableRect.middleHeight }) + + } } Label { @@ -245,7 +246,8 @@ Rectangle { anchors.fill: parent onClicked: { parent.expanded = !parent.expanded - tableRect.height = Qt.binding(function(){ return parent.expanded ? tableRect.expandedHeight : tableRect.middleHeight }) + if(checkBox.checked) tableRect.height = Qt.binding(function(){ return parent.expanded ? tableRect.expandedHeight : tableRect.collapsedHeight }) + else tableRect.height = Qt.binding(function(){ return parent.expanded ? tableRect.expandedHeight : tableRect.middleHeight }) } } } diff --git a/pages/Transfer.qml b/pages/Transfer.qml index 4841b2ec..fc5ba27c 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -185,6 +185,8 @@ Rectangle { id: checkBox text: qsTr("Add to Address book") anchors.bottom: sendButton.bottom + checkedIcon: "../images/checkedOrangeIcon.png" + uncheckedIcon: "../images/uncheckedIcon.png" } } } diff --git a/qml.qrc b/qml.qrc index a90c2434..b0a0e6f2 100644 --- a/qml.qrc +++ b/qml.qrc @@ -58,7 +58,7 @@ components/PrivacyLevel.qml images/privacyTick.png components/CheckBox.qml - images/checkedIcon.png + images/checkedOrangeIcon.png images/uncheckedIcon.png components/DatePicker.qml images/datePicker.png @@ -77,5 +77,6 @@ BasicPanel.qml images/moneroLogo2.png components/PrivacyLevelSmall.qml + images/checkedVioletIcon.png