mirror of
https://github.com/monero-project/monero-gui
synced 2025-01-17 13:57:27 +01:00
hide/show right panel
https://trello.com/c/BjPPAZfw/35-ability-to-hide-right-sidebar-as-discussed
This commit is contained in:
parent
0a352f33a7
commit
ca7472c79a
@ -24,19 +24,40 @@ Rectangle {
|
|||||||
width: 260
|
width: 260
|
||||||
color: "#FFFFFF"
|
color: "#FFFFFF"
|
||||||
|
|
||||||
Image {
|
Item {
|
||||||
id: logo
|
id: logoItem
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 31
|
anchors.topMargin: 31
|
||||||
source: "images/moneroLogo.png"
|
height: logo.implicitHeight
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: logo
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
source: "images/moneroLogo.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
anchors.right: logo.left
|
||||||
|
anchors.verticalCenter: logo.verticalCenter
|
||||||
|
anchors.verticalCenterOffset: 5
|
||||||
|
anchors.rightMargin: 10
|
||||||
|
source: appWindow.rightPanelExpanded ? "images/expandRightPanel.png" :
|
||||||
|
"images/collapseRightPanel.png"
|
||||||
|
}
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: appWindow.rightPanelExpanded = !appWindow.rightPanelExpanded
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: column1
|
id: column1
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: logo.bottom
|
anchors.top: logoItem.bottom
|
||||||
anchors.topMargin: 40
|
anchors.topMargin: 40
|
||||||
spacing: 6
|
spacing: 6
|
||||||
|
|
||||||
|
BIN
images/collapseRightPanel.png
Normal file
BIN
images/collapseRightPanel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 255 B |
BIN
images/expandRightPanel.png
Normal file
BIN
images/expandRightPanel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 260 B |
6
main.qml
6
main.qml
@ -10,6 +10,8 @@ ApplicationWindow {
|
|||||||
property var currentItem
|
property var currentItem
|
||||||
property bool whatIsEnable: false
|
property bool whatIsEnable: false
|
||||||
property bool ctrlPressed: false
|
property bool ctrlPressed: false
|
||||||
|
property bool rightPanelExpanded: true
|
||||||
|
|
||||||
function altKeyReleased() { ctrlPressed = false; }
|
function altKeyReleased() { ctrlPressed = false; }
|
||||||
function showPageRequest(page) {
|
function showPageRequest(page) {
|
||||||
middlePanel.state = page
|
middlePanel.state = page
|
||||||
@ -79,7 +81,7 @@ ApplicationWindow {
|
|||||||
}
|
}
|
||||||
|
|
||||||
visible: true
|
visible: true
|
||||||
width: 1269
|
width: rightPanelExpanded ? 1269 : 1269 - 300
|
||||||
height: 800
|
height: 800
|
||||||
color: "#FFFFFF"
|
color: "#FFFFFF"
|
||||||
x: (Screen.width - width) / 2
|
x: (Screen.width - width) / 2
|
||||||
@ -123,6 +125,8 @@ ApplicationWindow {
|
|||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
|
width: appWindow.rightPanelExpanded ? 300 : 0
|
||||||
|
visible: appWindow.rightPanelExpanded
|
||||||
}
|
}
|
||||||
|
|
||||||
MiddlePanel {
|
MiddlePanel {
|
||||||
|
@ -4,169 +4,169 @@ import "../components"
|
|||||||
Rectangle {
|
Rectangle {
|
||||||
color: "#F0EEEE"
|
color: "#F0EEEE"
|
||||||
|
|
||||||
// Text {
|
Text {
|
||||||
// id: newEntryText
|
id: newEntryText
|
||||||
// anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
// anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
// anchors.leftMargin: 17
|
anchors.leftMargin: 17
|
||||||
// anchors.topMargin: 17
|
anchors.topMargin: 17
|
||||||
|
|
||||||
// elide: Text.ElideRight
|
elide: Text.ElideRight
|
||||||
// font.family: "Arial"
|
font.family: "Arial"
|
||||||
// font.pixelSize: 18
|
font.pixelSize: 18
|
||||||
// color: "#4A4949"
|
color: "#4A4949"
|
||||||
// text: qsTr("Add new entry")
|
text: qsTr("Add new entry")
|
||||||
// }
|
}
|
||||||
|
|
||||||
// Label {
|
Label {
|
||||||
// id: addressLabel
|
id: addressLabel
|
||||||
// anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// anchors.top: newEntryText.bottom
|
anchors.top: newEntryText.bottom
|
||||||
// anchors.leftMargin: 17
|
anchors.leftMargin: 17
|
||||||
// anchors.topMargin: 17
|
anchors.topMargin: 17
|
||||||
// text: qsTr("Address")
|
text: qsTr("Address")
|
||||||
// fontSize: 14
|
fontSize: 14
|
||||||
// tipText: qsTr("<b>Tip tekst test</b>")
|
tipText: qsTr("<b>Tip tekst test</b>")
|
||||||
// }
|
}
|
||||||
|
|
||||||
// LineEdit {
|
LineEdit {
|
||||||
// id: addressLine
|
id: addressLine
|
||||||
// anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
// anchors.top: addressLabel.bottom
|
anchors.top: addressLabel.bottom
|
||||||
// anchors.leftMargin: 17
|
anchors.leftMargin: 17
|
||||||
// anchors.rightMargin: 17
|
anchors.rightMargin: 17
|
||||||
// anchors.topMargin: 5
|
anchors.topMargin: 5
|
||||||
// }
|
}
|
||||||
|
|
||||||
// Label {
|
Label {
|
||||||
// id: paymentIdLabel
|
id: paymentIdLabel
|
||||||
// anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// anchors.top: addressLine.bottom
|
anchors.top: addressLine.bottom
|
||||||
// anchors.leftMargin: 17
|
anchors.leftMargin: 17
|
||||||
// anchors.topMargin: 17
|
anchors.topMargin: 17
|
||||||
// text: qsTr("Payment ID <font size='2'>(Optional)</font>")
|
text: qsTr("Payment ID <font size='2'>(Optional)</font>")
|
||||||
// fontSize: 14
|
fontSize: 14
|
||||||
// tipText: qsTr("<b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during thevtransfer")
|
tipText: qsTr("<b>Payment ID</b><br/><br/>A unique user name used in<br/>the address book. It is not a<br/>transfer of information sent<br/>during thevtransfer")
|
||||||
// width: 156
|
width: 156
|
||||||
// }
|
}
|
||||||
|
|
||||||
// Label {
|
Label {
|
||||||
// id: descriptionLabel
|
id: descriptionLabel
|
||||||
// anchors.left: paymentIdLabel.right
|
anchors.left: paymentIdLabel.right
|
||||||
// anchors.top: addressLine.bottom
|
anchors.top: addressLine.bottom
|
||||||
// anchors.leftMargin: 17
|
anchors.leftMargin: 17
|
||||||
// anchors.topMargin: 17
|
anchors.topMargin: 17
|
||||||
// text: qsTr("Description <font size='2'>(Local database)</font>")
|
text: qsTr("Description <font size='2'>(Local database)</font>")
|
||||||
// fontSize: 14
|
fontSize: 14
|
||||||
// tipText: qsTr("<b>Tip tekst test</b><br/><br/>test line 2")
|
tipText: qsTr("<b>Tip tekst test</b><br/><br/>test line 2")
|
||||||
// width: 156
|
width: 156
|
||||||
// }
|
}
|
||||||
|
|
||||||
// LineEdit {
|
LineEdit {
|
||||||
// id: paymentIdLine
|
id: paymentIdLine
|
||||||
// anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// anchors.top: paymentIdLabel.bottom
|
anchors.top: paymentIdLabel.bottom
|
||||||
// anchors.leftMargin: 17
|
anchors.leftMargin: 17
|
||||||
// anchors.topMargin: 5
|
anchors.topMargin: 5
|
||||||
// width: 156
|
width: 156
|
||||||
// }
|
}
|
||||||
|
|
||||||
// LineEdit {
|
LineEdit {
|
||||||
// id: descriptionLine
|
id: descriptionLine
|
||||||
// anchors.left: paymentIdLine.right
|
anchors.left: paymentIdLine.right
|
||||||
// anchors.right: addButton.left
|
anchors.right: addButton.left
|
||||||
// anchors.top: paymentIdLabel.bottom
|
anchors.top: paymentIdLabel.bottom
|
||||||
// anchors.leftMargin: 17
|
anchors.leftMargin: 17
|
||||||
// anchors.rightMargin: 17
|
anchors.rightMargin: 17
|
||||||
// anchors.topMargin: 5
|
anchors.topMargin: 5
|
||||||
// }
|
}
|
||||||
|
|
||||||
// StandardButton {
|
StandardButton {
|
||||||
// id: addButton
|
id: addButton
|
||||||
// anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
// anchors.top: paymentIdLabel.bottom
|
anchors.top: paymentIdLabel.bottom
|
||||||
// anchors.rightMargin: 17
|
anchors.rightMargin: 17
|
||||||
// anchors.topMargin: 5
|
anchors.topMargin: 5
|
||||||
// width: 60
|
width: 60
|
||||||
|
|
||||||
// shadowReleasedColor: "#FF4304"
|
shadowReleasedColor: "#FF4304"
|
||||||
// shadowPressedColor: "#B32D00"
|
shadowPressedColor: "#B32D00"
|
||||||
// releasedColor: "#FF6C3C"
|
releasedColor: "#FF6C3C"
|
||||||
// pressedColor: "#FF4304"
|
pressedColor: "#FF4304"
|
||||||
// text: qsTr("ADD")
|
text: qsTr("ADD")
|
||||||
// }
|
}
|
||||||
|
|
||||||
// Rectangle {
|
Rectangle {
|
||||||
// anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
// anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
// anchors.top: paymentIdLine.bottom
|
anchors.top: paymentIdLine.bottom
|
||||||
// anchors.topMargin: 17
|
anchors.topMargin: 17
|
||||||
// color: "#FFFFFF"
|
color: "#FFFFFF"
|
||||||
|
|
||||||
// Rectangle {
|
Rectangle {
|
||||||
// anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
// anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
// height: 1
|
height: 1
|
||||||
// color: "#DBDBDB"
|
color: "#DBDBDB"
|
||||||
// }
|
}
|
||||||
|
|
||||||
// ListModel {
|
ListModel {
|
||||||
// id: columnsModel
|
id: columnsModel
|
||||||
// ListElement { columnName: "Payment ID"; columnWidth: 148 }
|
ListElement { columnName: "Payment ID"; columnWidth: 148 }
|
||||||
// ListElement { columnName: "Description"; columnWidth: 420 }
|
ListElement { columnName: "Description"; columnWidth: 420 }
|
||||||
// }
|
}
|
||||||
|
|
||||||
// TableHeader {
|
TableHeader {
|
||||||
// id: header
|
id: header
|
||||||
// anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
// anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
// anchors.topMargin: 17
|
anchors.topMargin: 17
|
||||||
// anchors.leftMargin: 14
|
anchors.leftMargin: 14
|
||||||
// anchors.rightMargin: 14
|
anchors.rightMargin: 14
|
||||||
// dataModel: columnsModel
|
dataModel: columnsModel
|
||||||
// onSortRequest: console.log("column: " + column + " desc: " + desc)
|
onSortRequest: console.log("column: " + column + " desc: " + desc)
|
||||||
// }
|
}
|
||||||
|
|
||||||
// ListModel {
|
ListModel {
|
||||||
// id: testModel
|
id: testModel
|
||||||
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
||||||
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
||||||
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
||||||
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
||||||
// ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "" }
|
ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "" }
|
||||||
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
||||||
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
||||||
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
||||||
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
||||||
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
||||||
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
||||||
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
||||||
// ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
ListElement { paymentId: "Malkolm T."; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "Client from Australia" }
|
||||||
// ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "" }
|
ListElement { paymentId: ""; address: "faef56b9acf67a7dba75ec01f403497049d7cff111628edfe7b57278554dc798"; description: "" }
|
||||||
// }
|
}
|
||||||
|
|
||||||
// Scroll {
|
Scroll {
|
||||||
// id: flickableScroll
|
id: flickableScroll
|
||||||
// anchors.rightMargin: -14
|
anchors.rightMargin: -14
|
||||||
// flickable: table
|
flickable: table
|
||||||
// yPos: table.y
|
yPos: table.y
|
||||||
// }
|
}
|
||||||
|
|
||||||
// AddressBookTable {
|
AddressBookTable {
|
||||||
// id: table
|
id: table
|
||||||
// anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
// anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
// anchors.top: header.bottom
|
anchors.top: header.bottom
|
||||||
// anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
// anchors.leftMargin: 14
|
anchors.leftMargin: 14
|
||||||
// anchors.rightMargin: 14
|
anchors.rightMargin: 14
|
||||||
// onContentYChanged: flickableScroll.flickableContentYChanged()
|
onContentYChanged: flickableScroll.flickableContentYChanged()
|
||||||
// model: testModel
|
model: testModel
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
2
qml.qrc
2
qml.qrc
@ -67,5 +67,7 @@
|
|||||||
<file>images/prevMonth.png</file>
|
<file>images/prevMonth.png</file>
|
||||||
<file>components/TickDelegate.qml</file>
|
<file>components/TickDelegate.qml</file>
|
||||||
<file>components/TitleBar.qml</file>
|
<file>components/TitleBar.qml</file>
|
||||||
|
<file>images/collapseRightPanel.png</file>
|
||||||
|
<file>images/expandRightPanel.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
Loading…
Reference in New Issue
Block a user