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 00000000..736cdd2e Binary files /dev/null and b/images/checkedVioletIcon.png differ 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