mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-02-25 20:35:24 +02:00
This commit is contained in:
parent
0e5dbbc197
commit
2f54bb12eb
@ -12,7 +12,10 @@ ListView {
|
|||||||
height: 64
|
height: 64
|
||||||
width: listView.width
|
width: listView.width
|
||||||
color: index % 2 ? "#F8F8F8" : "#FFFFFF"
|
color: index % 2 ? "#F8F8F8" : "#FFFFFF"
|
||||||
function collapseDropdown() { dropdown.expanded = false }
|
function collapseDropdown() {
|
||||||
|
z = 1
|
||||||
|
dropdown.expanded = false
|
||||||
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: descriptionText
|
id: descriptionText
|
||||||
@ -95,8 +98,6 @@ ListView {
|
|||||||
dataModel: dropModel
|
dataModel: dropModel
|
||||||
z: 1
|
z: 1
|
||||||
onExpandedChanged: {
|
onExpandedChanged: {
|
||||||
if(listView.previousItem !== undefined && listView.previousItem !== delegate)
|
|
||||||
listView.previousItem.collapseDropdown()
|
|
||||||
if(expanded) {
|
if(expanded) {
|
||||||
listView.previousItem = delegate
|
listView.previousItem = delegate
|
||||||
listView.currentIndex = index
|
listView.currentIndex = index
|
||||||
|
@ -192,7 +192,7 @@ ListView {
|
|||||||
anchors.bottomMargin: 11
|
anchors.bottomMargin: 11
|
||||||
anchors.rightMargin: 5
|
anchors.rightMargin: 5
|
||||||
dataModel: dropModel
|
dataModel: dropModel
|
||||||
z: 5
|
z: 1
|
||||||
onExpandedChanged: {
|
onExpandedChanged: {
|
||||||
if(expanded) {
|
if(expanded) {
|
||||||
listView.previousItem = delegate
|
listView.previousItem = delegate
|
||||||
|
@ -7,7 +7,7 @@ Rectangle {
|
|||||||
color: "#000000"
|
color: "#000000"
|
||||||
y: -height
|
y: -height
|
||||||
property int mouseX: 0
|
property int mouseX: 0
|
||||||
property int mouseY: 0
|
property bool containsMouse: false
|
||||||
property alias maximizeButtonVisible: maximizeButton.visible
|
property alias maximizeButtonVisible: maximizeButton.visible
|
||||||
signal goToBasicVersion(bool yes)
|
signal goToBasicVersion(bool yes)
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ Rectangle {
|
|||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width
|
property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width && titleBar.containsMouse
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: height
|
width: height
|
||||||
@ -78,7 +78,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width
|
property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width && titleBar.containsMouse
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: height
|
width: height
|
||||||
@ -92,13 +92,17 @@ Rectangle {
|
|||||||
MouseArea {
|
MouseArea {
|
||||||
id: minimizeArea
|
id: minimizeArea
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: appWindow.visibility = Window.Minimized
|
onClicked: {
|
||||||
|
appWindow.visibility = Window.Minimized
|
||||||
|
// parent.containsMouse = Qt.binding(function(){ return titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width &&
|
||||||
|
// appWindow.visibility !== Window.Minimized })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: maximizeButton
|
id: maximizeButton
|
||||||
property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width
|
property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width && titleBar.containsMouse
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: height
|
width: height
|
||||||
@ -122,7 +126,7 @@ Rectangle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width
|
property bool containsMouse: titleBar.mouseX >= x + row.x && titleBar.mouseX <= x + row.x + width && titleBar.containsMouse
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
width: height
|
width: height
|
||||||
|
6
main.qml
6
main.qml
@ -156,10 +156,8 @@ ApplicationWindow {
|
|||||||
propagateComposedEvents: true
|
propagateComposedEvents: true
|
||||||
onPressed: mouse.accepted = false
|
onPressed: mouse.accepted = false
|
||||||
onReleased: mouse.accepted = false
|
onReleased: mouse.accepted = false
|
||||||
onMouseXChanged: {
|
onMouseXChanged: titleBar.mouseX = mouseX
|
||||||
titleBar.mouseX = mouseX
|
onContainsMouseChanged: titleBar.containsMouse = containsMouse
|
||||||
titleBar.mouseY = mouseY
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
|
Loading…
Reference in New Issue
Block a user