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 {
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
}
}

View file

@ -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

View file

@ -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 {

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

View file

@ -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("<style type='text/css'>a {text-decoration: none; color: #6B0072; font-size: 14px;}</style>\
looking for <a href='#'>Advance filtering?</a>")
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 })
}
}
}

View file

@ -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"
}
}
}

View file

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