diff --git a/.config/ags/lib/animatedcircularprogress.js b/.config/ags/lib/animatedcircularprogress.js index 4a86eb423..83c184227 100644 --- a/.config/ags/lib/animatedcircularprogress.js +++ b/.config/ags/lib/animatedcircularprogress.js @@ -83,22 +83,22 @@ export const AnimatedCircProg = ({ // Init animation if (initFrom != initTo) { - // area.css = `font-size: ${initFrom}px; transition: ${initAnimTime}ms linear;`; + area.css = `font-size: ${initFrom}px; transition: ${initAnimTime}ms linear;`; Utils.timeout(20, () => { area.css = `font-size: ${initTo}px;`; }, area) - // const transitionDistance = initTo - initFrom; - // const oneStep = initAnimTime / initAnimPoints; - // area.css = ` - // font-size: ${initFrom}px; - // transition: ${oneStep}ms linear; - // `; - // for (let i = 0; i < initAnimPoints; i++) { - // Utils.timeout(Math.max(10, i * oneStep), () => { - // if(!area) return; - // area.css = `${initFrom != initTo ? 'font-size: ' + (initFrom + (transitionDistance / initAnimPoints * (i + 1))) + 'px;' : ''}`; - // }); - // } + const transitionDistance = initTo - initFrom; + const oneStep = initAnimTime / initAnimPoints; + area.css = ` + font-size: ${initFrom}px; + transition: ${oneStep}ms linear; + `; + for (let i = 0; i < initAnimPoints; i++) { + Utils.timeout(Math.max(10, i * oneStep), () => { + if(!area) return; + area.css = `${initFrom != initTo ? 'font-size: ' + (initFrom + (transitionDistance / initAnimPoints * (i + 1))) + 'px;' : ''}`; + }); + } } else area.css = 'font-size: 0px;'; extraSetup(area); diff --git a/.config/ags/lib/notification.js b/.config/ags/lib/notification.js index a32cff52c..e722f1184 100644 --- a/.config/ags/lib/notification.js +++ b/.config/ags/lib/notification.js @@ -77,7 +77,7 @@ export default ({ isPopup = false, props = {}, } = {}) => { - const popupTimeout = notifObject.urgency == 'critical' ? 8000 : 3000; + const popupTimeout = notifObject.timeout || (notifObject.urgency == 'critical' ? 8000 : 3000); const command = (isPopup ? () => notifObject.dismiss() : () => notifObject.close() @@ -435,17 +435,17 @@ export default ({ }) widget.add(notificationBox); wholeThing.child.children = [widget]; - if (isPopup) Utils.timeout(popupTimeout, () => { - if (wholeThing) { - wholeThing.revealChild = false; - Utils.timeout(200, () => { - if (wholeThing) { - wholeThing.destroy(); - wholeThing = null; - } - command(); - }, wholeThing); - } - }) + // if (isPopup) Utils.timeout(popupTimeout, () => { + // if (wholeThing) { + // wholeThing.revealChild = false; + // Utils.timeout(200, () => { + // if (wholeThing) { + // wholeThing.destroy(); + // wholeThing = null; + // } + // command(); + // }, wholeThing); + // } + // }) return wholeThing; }