mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-06 05:25:41 -05:00
25 lines
643 B
QML
25 lines
643 B
QML
import QtQuick
|
|
import qs.Common
|
|
import qs.Widgets
|
|
|
|
MouseArea {
|
|
id: root
|
|
|
|
property bool disabled: false
|
|
property color stateColor: Theme.surfaceText
|
|
property real cornerRadius: parent?.radius ?? Theme.cornerRadius
|
|
|
|
anchors.fill: parent
|
|
cursorShape: disabled ? undefined : Qt.PointingHandCursor
|
|
hoverEnabled: true
|
|
|
|
Rectangle {
|
|
id: hoverLayer
|
|
anchors.fill: parent
|
|
radius: root.cornerRadius
|
|
color: Qt.rgba(
|
|
root.stateColor.r, root.stateColor.g, root.stateColor.b,
|
|
root.disabled ? 0 : root.pressed ? 0.12 : root.containsMouse ? 0.08 : 0)
|
|
}
|
|
}
|