marcin 2014-07-22 16:55:25 +02:00
parent 2f54bb12eb
commit 84c251398c
9 changed files with 87 additions and 16 deletions

View file

@ -3,6 +3,8 @@ import QtQuick 2.0
Item { Item {
id: checkBox id: checkBox
property alias text: label.text property alias text: label.text
property string checkedIcon
property string uncheckedIcon
property bool checked: false property bool checked: false
signal clicked() signal clicked()
height: 25 height: 25
@ -28,8 +30,8 @@ Item {
Image { Image {
anchors.centerIn: parent anchors.centerIn: parent
source: checkBox.checked ? "../images/checkedIcon.png" : source: checkBox.checked ? checkBox.checkedIcon :
"../images/uncheckedIcon.png" checkBox.uncheckedIcon
} }
} }

View file

@ -12,7 +12,7 @@ Rectangle {
y = (flickable.contentY / (flickable.contentHeight - flickable.height)) * t + yPos y = (flickable.contentY / (flickable.contentHeight - flickable.height)) * t + yPos
} }
width: 12 width: 15
height: { height: {
var t = (flickable.height * flickable.height) / flickable.contentHeight var t = (flickable.height * flickable.height) / flickable.contentHeight
return t < 20 ? 20 : t return t < 20 ? 20 : t

View file

@ -7,6 +7,7 @@ Rectangle {
color: "#000000" color: "#000000"
y: -height y: -height
property int mouseX: 0 property int mouseX: 0
property string walletName: "Donations"
property bool containsMouse: false property bool containsMouse: false
property alias maximizeButtonVisible: maximizeButton.visible property alias maximizeButtonVisible: maximizeButton.visible
signal goToBasicVersion(bool yes) signal goToBasicVersion(bool yes)
@ -17,7 +18,7 @@ Rectangle {
font.pixelSize: 15 font.pixelSize: 15
font.letterSpacing: -1 font.letterSpacing: -1
color: "#FFFFFF" color: "#FFFFFF"
text: qsTr("Monero") text: qsTr("Monero - %1").arg(titleBar.walletName)
} }
Behavior on y { Behavior on y {

View file

Before

Width:  |  Height:  |  Size: 317 B

After

Width:  |  Height:  |  Size: 317 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

View file

@ -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 { TitleBar {
id: titleBar id: titleBar
anchors.left: parent.left anchors.left: parent.left

View file

@ -136,18 +136,19 @@ Rectangle {
pressedColor: "#4D0051" pressedColor: "#4D0051"
} }
Text { CheckBox {
anchors.verticalCenter: filterButton.verticalCenter id: checkBox
text: qsTr("Advance filtering")
anchors.left: filterButton.right anchors.left: filterButton.right
anchors.bottom: filterButton.bottom
anchors.leftMargin: 17 anchors.leftMargin: 17
font.family: "Arial" checkedIcon: "../images/checkedVioletIcon.png"
font.pixelSize: 12 uncheckedIcon: "../images/uncheckedIcon.png"
color: "#545454" onClicked: {
textFormat: Text.RichText if(checked) tableRect.height = Qt.binding(function(){ return tableRect.collapsedHeight })
text: qsTr("<style type='text/css'>a {text-decoration: none; color: #6B0072; font-size: 14px;}</style>\ else tableRect.height = Qt.binding(function(){ return tableRect.middleHeight })
looking for <a href='#'>Advance filtering?</a>")
font.underline: false }
onLinkActivated: tableRect.height = Qt.binding(function(){ return tableRect.collapsedHeight })
} }
Label { Label {
@ -245,7 +246,8 @@ Rectangle {
anchors.fill: parent anchors.fill: parent
onClicked: { onClicked: {
parent.expanded = !parent.expanded 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 })
} }
} }
} }

View file

@ -185,6 +185,8 @@ Rectangle {
id: checkBox id: checkBox
text: qsTr("Add to Address book") text: qsTr("Add to Address book")
anchors.bottom: sendButton.bottom anchors.bottom: sendButton.bottom
checkedIcon: "../images/checkedOrangeIcon.png"
uncheckedIcon: "../images/uncheckedIcon.png"
} }
} }
} }

View file

@ -58,7 +58,7 @@
<file>components/PrivacyLevel.qml</file> <file>components/PrivacyLevel.qml</file>
<file>images/privacyTick.png</file> <file>images/privacyTick.png</file>
<file>components/CheckBox.qml</file> <file>components/CheckBox.qml</file>
<file>images/checkedIcon.png</file> <file>images/checkedOrangeIcon.png</file>
<file>images/uncheckedIcon.png</file> <file>images/uncheckedIcon.png</file>
<file>components/DatePicker.qml</file> <file>components/DatePicker.qml</file>
<file>images/datePicker.png</file> <file>images/datePicker.png</file>
@ -77,5 +77,6 @@
<file>BasicPanel.qml</file> <file>BasicPanel.qml</file>
<file>images/moneroLogo2.png</file> <file>images/moneroLogo2.png</file>
<file>components/PrivacyLevelSmall.qml</file> <file>components/PrivacyLevelSmall.qml</file>
<file>images/checkedVioletIcon.png</file>
</qresource> </qresource>
</RCC> </RCC>