mirror of
https://github.com/monero-project/monero-gui
synced 2024-12-22 03:15:52 +01:00
fix broken basic button
This commit is contained in:
parent
e826f7c1ec
commit
d9a2b1aa60
@ -41,6 +41,7 @@ Rectangle {
|
|||||||
y: -height
|
y: -height
|
||||||
property string title
|
property string title
|
||||||
property alias maximizeButtonVisible: maximizeButton.visible
|
property alias maximizeButtonVisible: maximizeButton.visible
|
||||||
|
z: 1
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
@ -52,28 +53,26 @@ Rectangle {
|
|||||||
visible: customDecorations
|
visible: customDecorations
|
||||||
}
|
}
|
||||||
|
|
||||||
Behavior on y {
|
|
||||||
NumberAnimation { duration: 100; easing.type: Easing.InQuad }
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: goToBasicVersionButton
|
id: goToBasicVersionButton
|
||||||
property bool containsMouse: titleBar.mouseX >= x && titleBar.mouseX <= x + width
|
property bool containsMouse: titleBar.mouseX >= x && titleBar.mouseX <= x + width
|
||||||
property bool checked: false
|
property bool checked: false
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
color: containsMouse || checked ? "#FFE00A" : "#000000"
|
color: basicMouseArea.containsMouse || checked ? "#FFE00A" : "#000000"
|
||||||
height: 30
|
height: 30
|
||||||
width: height
|
width: height
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
rotation: parent.checked ? 180 : 0
|
rotation: parent.checked ? 180 : 0
|
||||||
source: parent.containsMouse || parent.checked ? "../images/goToBasicVersionHovered.png" :
|
source: parent.customDecorations || parent.checked ? "../images/goToBasicVersionHovered.png" :
|
||||||
"../images/gotoBasicVersion.png"
|
"../images/gotoBasicVersion.png"
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
id: basicMouseArea
|
||||||
|
hoverEnabled: true
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onClicked: {
|
onClicked: {
|
||||||
parent.checked = !parent.checked
|
parent.checked = !parent.checked
|
||||||
|
Loading…
Reference in New Issue
Block a user