mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-05 05:12:05 -04:00
animations/ripple: clean up effect and apply more universally
This commit is contained in:
@@ -268,12 +268,19 @@ PanelWindow {
|
||||
}
|
||||
}
|
||||
|
||||
DankRipple {
|
||||
id: windowRipple
|
||||
rippleColor: Theme.surfaceText
|
||||
cornerRadius: Theme.cornerRadius
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: windowArea
|
||||
anchors.fill: parent
|
||||
anchors.rightMargin: 24
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onPressed: mouse => windowRipple.trigger(mouse.x, mouse.y)
|
||||
onClicked: {
|
||||
if (modelData && modelData.activate) {
|
||||
modelData.activate();
|
||||
@@ -340,11 +347,18 @@ PanelWindow {
|
||||
}
|
||||
}
|
||||
|
||||
DankRipple {
|
||||
id: actionRipple
|
||||
rippleColor: Theme.surfaceText
|
||||
cornerRadius: Theme.cornerRadius
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: actionArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onPressed: mouse => actionRipple.trigger(mouse.x, mouse.y)
|
||||
onClicked: {
|
||||
if (modelData) {
|
||||
SessionService.launchDesktopAction(root.desktopEntry, modelData);
|
||||
@@ -388,11 +402,18 @@ PanelWindow {
|
||||
wrapMode: Text.NoWrap
|
||||
}
|
||||
|
||||
DankRipple {
|
||||
id: pinRipple
|
||||
rippleColor: Theme.surfaceText
|
||||
cornerRadius: Theme.cornerRadius
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: pinArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onPressed: mouse => pinRipple.trigger(mouse.x, mouse.y)
|
||||
onClicked: {
|
||||
if (!root.appData)
|
||||
return;
|
||||
@@ -441,11 +462,18 @@ PanelWindow {
|
||||
wrapMode: Text.NoWrap
|
||||
}
|
||||
|
||||
DankRipple {
|
||||
id: nvidiaRipple
|
||||
rippleColor: Theme.surfaceText
|
||||
cornerRadius: Theme.cornerRadius
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: nvidiaArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onPressed: mouse => nvidiaRipple.trigger(mouse.x, mouse.y)
|
||||
onClicked: {
|
||||
if (root.desktopEntry) {
|
||||
SessionService.launchDesktopEntry(root.desktopEntry, true);
|
||||
@@ -481,11 +509,18 @@ PanelWindow {
|
||||
wrapMode: Text.NoWrap
|
||||
}
|
||||
|
||||
DankRipple {
|
||||
id: closeRipple
|
||||
rippleColor: Theme.error
|
||||
cornerRadius: Theme.cornerRadius
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: closeArea
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onPressed: mouse => closeRipple.trigger(mouse.x, mouse.y)
|
||||
onClicked: {
|
||||
if (root.appData?.type === "window") {
|
||||
root.appData?.toplevel?.close();
|
||||
|
||||
Reference in New Issue
Block a user