mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-16 10:42:06 -04:00
frame(Notifications): Update Arc path & Motion
This commit is contained in:
@@ -43,6 +43,7 @@ QtObject {
|
||||
popupComponent: Component {
|
||||
NotificationPopup {
|
||||
onExitFinished: manager._onPopupExitFinished(this)
|
||||
onExitStarted: manager._onPopupExitStarted(this)
|
||||
onPopupHeightChanged: manager._onPopupHeightChanged(this)
|
||||
onPopupChromeGeometryChanged: manager._onPopupChromeGeometryChanged(this)
|
||||
}
|
||||
@@ -263,9 +264,14 @@ QtObject {
|
||||
}
|
||||
|
||||
function _popupChromeVisibleFraction(p) {
|
||||
if (p.exiting && p.popupChromeReleaseProgress)
|
||||
return 1 - _chromeReleaseTailProgress(p.popupChromeReleaseProgress());
|
||||
if (!p.exiting && p.popupChromeOpenProgress)
|
||||
if (p.popupChromeReleaseProgress) {
|
||||
const rel = p.popupChromeReleaseProgress();
|
||||
if (p.exiting)
|
||||
return Math.max(0, 1 - rel);
|
||||
if (rel > 0)
|
||||
return p.swipeDismissTowardEdge ? Math.max(0, 1 - rel) : 1 - _chromeReleaseTailProgress(rel);
|
||||
}
|
||||
if (p.popupChromeOpenProgress)
|
||||
return _clamp01(p.popupChromeOpenProgress());
|
||||
return 1;
|
||||
}
|
||||
@@ -389,6 +395,7 @@ QtObject {
|
||||
ConnectedModeState.clearNotificationState(screenName);
|
||||
return;
|
||||
}
|
||||
|
||||
const trailing = chromeCandidates.length > 1 ? _trailingChromeWindow(chromeCandidates) : null;
|
||||
let active = chromeCandidates;
|
||||
if (chromeCandidates.length > 1) {
|
||||
@@ -396,6 +403,7 @@ QtObject {
|
||||
if (reserving.length > 0)
|
||||
active = reserving;
|
||||
}
|
||||
|
||||
let minX = Infinity;
|
||||
let minY = Infinity;
|
||||
let maxXEnd = -Infinity;
|
||||
@@ -449,6 +457,12 @@ QtObject {
|
||||
_repositionAll();
|
||||
}
|
||||
|
||||
function _onPopupExitStarted(p) {
|
||||
if (!p || popupWindows.indexOf(p) === -1)
|
||||
return;
|
||||
_repositionAll();
|
||||
}
|
||||
|
||||
function _onPopupExitFinished(p) {
|
||||
if (!p)
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user