mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-11 08:12:09 -04:00
Restore click to expand animation on notif cards
This commit is contained in:
@@ -339,8 +339,13 @@ Rectangle {
|
|||||||
|
|
||||||
onClicked: mouse => {
|
onClicked: mouse => {
|
||||||
if (!parent.hoveredLink && (parent.hasMoreText || descriptionExpanded)) {
|
if (!parent.hoveredLink && (parent.hasMoreText || descriptionExpanded)) {
|
||||||
|
root.userInitiatedExpansion = true;
|
||||||
const messageId = (notificationGroup && notificationGroup.latestNotification && notificationGroup.latestNotification.notification && notificationGroup.latestNotification.notification.id) ? (notificationGroup.latestNotification.notification.id + "_desc") : "";
|
const messageId = (notificationGroup && notificationGroup.latestNotification && notificationGroup.latestNotification.notification && notificationGroup.latestNotification.notification.id) ? (notificationGroup.latestNotification.notification.id + "_desc") : "";
|
||||||
NotificationService.toggleMessageExpansion(messageId);
|
NotificationService.toggleMessageExpansion(messageId);
|
||||||
|
Qt.callLater(() => {
|
||||||
|
if (root && !root.isAnimating)
|
||||||
|
root.userInitiatedExpansion = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -638,7 +643,12 @@ Rectangle {
|
|||||||
|
|
||||||
onClicked: mouse => {
|
onClicked: mouse => {
|
||||||
if (!parent.hoveredLink && (bodyText.hasMoreText || messageExpanded)) {
|
if (!parent.hoveredLink && (bodyText.hasMoreText || messageExpanded)) {
|
||||||
|
root.userInitiatedExpansion = true;
|
||||||
NotificationService.toggleMessageExpansion(modelData?.notification?.id || "");
|
NotificationService.toggleMessageExpansion(modelData?.notification?.id || "");
|
||||||
|
Qt.callLater(() => {
|
||||||
|
if (root && !root.isAnimating)
|
||||||
|
root.userInitiatedExpansion = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -321,8 +321,8 @@ PanelWindow {
|
|||||||
|
|
||||||
readonly property bool screenValid: win.screen && !_isDestroying
|
readonly property bool screenValid: win.screen && !_isDestroying
|
||||||
readonly property real dpr: screenValid ? CompositorService.getScreenScale(win.screen) : 1
|
readonly property real dpr: screenValid ? CompositorService.getScreenScale(win.screen) : 1
|
||||||
readonly property real alignedWidth: Theme.px(contentImplicitWidth, dpr)
|
readonly property real alignedWidth: Theme.px(Math.max(0, implicitWidth - (windowShadowPad * 2)), dpr)
|
||||||
readonly property real alignedHeight: Theme.px(contentImplicitHeight, dpr)
|
readonly property real alignedHeight: Theme.px(Math.max(0, implicitHeight - (windowShadowPad * 2)), dpr)
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: content
|
id: content
|
||||||
|
|||||||
Reference in New Issue
Block a user