1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-05 21:15:38 -05:00

better hover effect

This commit is contained in:
bbedward
2025-09-01 20:24:42 -04:00
parent 5c9e9385e6
commit cb1b0550a2

View File

@@ -375,30 +375,28 @@ Rectangle {
Rectangle {
anchors.fill: parent
anchors.margins: Theme.spacingS
height: 28
radius: Theme.cornerRadius / 2
radius: parent.radius
color: closeMouseArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent"
StyledText {
anchors.centerIn: parent
text: "Close"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceText
font.weight: Font.Normal
}
MouseArea {
id: closeMouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
if (contextMenuWindow.currentWindow) {
contextMenuWindow.currentWindow.close()
}
contextMenuWindow.close()
}
StyledText {
anchors.centerIn: parent
text: "Close"
font.pixelSize: Theme.fontSizeSmall
color: Theme.surfaceText
font.weight: Font.Normal
}
MouseArea {
id: closeMouseArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: {
if (contextMenuWindow.currentWindow) {
contextMenuWindow.currentWindow.close()
}
contextMenuWindow.close()
}
}
}