mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
22
appIcons.js
22
appIcons.js
@@ -750,24 +750,20 @@ var TaskbarAppIcon = GObject.registerClass({
|
||||
// animation is enabled in settings
|
||||
// AND (going from a wide style to a narrow style indicator or vice-versa
|
||||
// OR going from an open app to a closed app or vice versa)
|
||||
if(Me.settings.get_boolean('animate-app-switch') &&
|
||||
((focusedIsWide != unfocusedIsWide) ||
|
||||
(this._focusedDots[sizeProp] != newUnfocusedDotsSize || this._unfocusedDots[sizeProp] != newFocusedDotsSize))) {
|
||||
this._animateDotDisplay(this._focusedDots, newFocusedDotsSize, this._unfocusedDots, newUnfocusedDotsOpacity, sizeProp);
|
||||
this._animateDotDisplay(this._unfocusedDots, newUnfocusedDotsSize, this._focusedDots, newFocusedDotsOpacity, sizeProp);
|
||||
} else {
|
||||
this._focusedDots.opacity = newFocusedDotsOpacity;
|
||||
this._unfocusedDots.opacity = newUnfocusedDotsOpacity;
|
||||
this._focusedDots[sizeProp] = newFocusedDotsSize;
|
||||
this._unfocusedDots[sizeProp] = newUnfocusedDotsSize;
|
||||
}
|
||||
let animate = Me.settings.get_boolean('animate-app-switch') &&
|
||||
((focusedIsWide != unfocusedIsWide) ||
|
||||
(this._focusedDots[sizeProp] != newUnfocusedDotsSize || this._unfocusedDots[sizeProp] != newFocusedDotsSize))
|
||||
let duration = animate ? Taskbar.DASH_ANIMATION_TIME : 0.001;
|
||||
|
||||
this._animateDotDisplay(this._focusedDots, newFocusedDotsSize, this._unfocusedDots, newUnfocusedDotsOpacity, sizeProp, duration);
|
||||
this._animateDotDisplay(this._unfocusedDots, newUnfocusedDotsSize, this._focusedDots, newFocusedDotsOpacity, sizeProp, duration);
|
||||
}
|
||||
}
|
||||
|
||||
_animateDotDisplay(dots, newSize, otherDots, newOtherOpacity, sizeProp) {
|
||||
_animateDotDisplay(dots, newSize, otherDots, newOtherOpacity, sizeProp, duration) {
|
||||
if(dots[sizeProp] != newSize && dots._tweeningToSize !== newSize) {
|
||||
let tweenOpts = {
|
||||
time: Taskbar.DASH_ANIMATION_TIME,
|
||||
time: duration,
|
||||
transition: 'easeInOutCubic',
|
||||
onComplete: () => {
|
||||
if(newOtherOpacity > 0)
|
||||
|
||||
2
utils.js
2
utils.js
@@ -441,7 +441,7 @@ var animateWindowOpacity = function(window, tweenOpts) {
|
||||
var animate = function(actor, options) {
|
||||
//the original animations used Tweener instead of Clutter animations, so we
|
||||
//use "time" and "delay" properties defined in seconds, as opposed to Clutter
|
||||
//animations duration" and "delay" which are defined in milliseconds
|
||||
//animations "duration" and "delay" which are defined in milliseconds
|
||||
if (options.delay) {
|
||||
options.delay = options.delay * 1000;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user