1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -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 { Rectangle {
anchors.fill: parent anchors.fill: parent
anchors.margins: Theme.spacingS radius: parent.radius
height: 28
radius: Theme.cornerRadius / 2
color: closeMouseArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent" color: closeMouseArea.containsMouse ? Qt.rgba(Theme.primary.r, Theme.primary.g, Theme.primary.b, 0.08) : "transparent"
}
StyledText {
anchors.centerIn: parent StyledText {
text: "Close" anchors.centerIn: parent
font.pixelSize: Theme.fontSizeSmall text: "Close"
color: Theme.surfaceText font.pixelSize: Theme.fontSizeSmall
font.weight: Font.Normal color: Theme.surfaceText
} font.weight: Font.Normal
}
MouseArea {
id: closeMouseArea MouseArea {
anchors.fill: parent id: closeMouseArea
hoverEnabled: true anchors.fill: parent
cursorShape: Qt.PointingHandCursor hoverEnabled: true
onClicked: { cursorShape: Qt.PointingHandCursor
if (contextMenuWindow.currentWindow) { onClicked: {
contextMenuWindow.currentWindow.close() if (contextMenuWindow.currentWindow) {
} contextMenuWindow.currentWindow.close()
contextMenuWindow.close()
} }
contextMenuWindow.close()
} }
} }
} }