cleanup: Use milliseconds for animation times

The different units - seconds for Tweener and milliseconds for
timeouts - are not a big issue currently, as there is little
overlap. However this will change when we start using Clutter's
own animation framework (which uses milliseconds as well), in
particular where constants are shared between modules.

In order to prepare for the transition, define all animation times
as milliseconds and adjust them when passing them to Tweener.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/663
This commit is contained in:
Florian Müllner 2019-08-02 01:13:10 +02:00 committed by Georges Basile Stavracas Neto
parent 31968ea53c
commit 476816732f
35 changed files with 232 additions and 230 deletions

View File

@ -12,10 +12,10 @@ const Tweener = imports.ui.tweener;
const UserWidget = imports.ui.userWidget;
var DEFAULT_BUTTON_WELL_ICON_SIZE = 16;
var DEFAULT_BUTTON_WELL_ANIMATION_DELAY = 1.0;
var DEFAULT_BUTTON_WELL_ANIMATION_TIME = 0.3;
var DEFAULT_BUTTON_WELL_ANIMATION_DELAY = 1000;
var DEFAULT_BUTTON_WELL_ANIMATION_TIME = 300;
var MESSAGE_FADE_OUT_ANIMATION_TIME = 0.5;
var MESSAGE_FADE_OUT_ANIMATION_TIME = 500;
var AuthPromptMode = {
UNLOCK_ONLY: 0,
@ -292,8 +292,8 @@ var AuthPrompt = class {
} else {
Tweener.addTween(oldActor,
{ opacity: 0,
time: DEFAULT_BUTTON_WELL_ANIMATION_TIME,
delay: DEFAULT_BUTTON_WELL_ANIMATION_DELAY,
time: DEFAULT_BUTTON_WELL_ANIMATION_TIME / 1000,
delay: DEFAULT_BUTTON_WELL_ANIMATION_DELAY / 1000,
transition: 'linear',
onComplete: () => {
if (wasSpinner) {
@ -314,8 +314,8 @@ var AuthPrompt = class {
else
Tweener.addTween(actor,
{ opacity: 255,
time: DEFAULT_BUTTON_WELL_ANIMATION_TIME,
delay: DEFAULT_BUTTON_WELL_ANIMATION_DELAY,
time: DEFAULT_BUTTON_WELL_ANIMATION_TIME / 1000,
delay: DEFAULT_BUTTON_WELL_ANIMATION_DELAY / 1000,
transition: 'linear' });
}
@ -368,7 +368,7 @@ var AuthPrompt = class {
Tweener.removeTweens(this._message);
Tweener.addTween(this._message,
{ opacity: 0,
time: MESSAGE_FADE_OUT_ANIMATION_TIME,
time: MESSAGE_FADE_OUT_ANIMATION_TIME / 1000,
transition: 'easeOutQuad'
});
}

View File

@ -34,8 +34,8 @@ const Realmd = imports.gdm.realmd;
const Tweener = imports.ui.tweener;
const UserWidget = imports.ui.userWidget;
const _FADE_ANIMATION_TIME = 0.25;
const _SCROLL_ANIMATION_TIME = 0.5;
const _FADE_ANIMATION_TIME = 250;
const _SCROLL_ANIMATION_TIME = 500;
const _TIMED_LOGIN_IDLE_THRESHOLD = 5.0;
const _LOGO_ICON_HEIGHT = 48;
const _MAX_BOTTOM_MENU_ITEMS = 5;
@ -208,7 +208,7 @@ var UserList = class {
Tweener.removeTweens(adjustment);
Tweener.addTween (adjustment,
{ value: value,
time: _SCROLL_ANIMATION_TIME,
time: _SCROLL_ANIMATION_TIME / 1000,
transition: 'easeOutQuad' });
}
@ -761,7 +761,7 @@ var LoginDialog = GObject.registerClass({
this._bannerView.show();
Tweener.addTween(this._bannerView,
{ opacity: 255,
time: _FADE_ANIMATION_TIME,
time: _FADE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad' });
}
@ -861,7 +861,7 @@ var LoginDialog = GObject.registerClass({
this._authPrompt.actor.show();
Tweener.addTween(this._authPrompt.actor,
{ opacity: 255,
time: _FADE_ANIMATION_TIME,
time: _FADE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad' });
this._fadeInBannerView();
}
@ -912,7 +912,7 @@ var LoginDialog = GObject.registerClass({
Tweener.addTween(this,
{ opacity: 255,
time: _FADE_ANIMATION_TIME,
time: _FADE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onUpdate: () => {
let children = Main.layoutManager.uiGroup.get_children();
@ -940,7 +940,7 @@ var LoginDialog = GObject.registerClass({
_startSession(serviceName) {
Tweener.addTween(this,
{ opacity: 0,
time: _FADE_ANIMATION_TIME,
time: _FADE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onUpdate: () => {
let children = Main.layoutManager.uiGroup.get_children();

View File

@ -17,8 +17,8 @@ var PASSWORD_SERVICE_NAME = 'gdm-password';
var FINGERPRINT_SERVICE_NAME = 'gdm-fingerprint';
var SMARTCARD_SERVICE_NAME = 'gdm-smartcard';
var OVIRT_SERVICE_NAME = 'gdm-ovirtcred';
var FADE_ANIMATION_TIME = 0.16;
var CLONE_FADE_ANIMATION_TIME = 0.25;
var FADE_ANIMATION_TIME = 160;
var CLONE_FADE_ANIMATION_TIME = 250;
var LOGIN_SCREEN_SCHEMA = 'org.gnome.login-screen';
var PASSWORD_AUTHENTICATION_KEY = 'enable-password-authentication';
@ -54,7 +54,7 @@ function fadeInActor(actor) {
Tweener.addTween(actor,
{ opacity: 255,
height: naturalHeight,
time: FADE_ANIMATION_TIME,
time: FADE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete() {
this.set_height(-1);
@ -76,7 +76,7 @@ function fadeOutActor(actor) {
Tweener.addTween(actor,
{ opacity: 0,
height: 0,
time: FADE_ANIMATION_TIME,
time: FADE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete() {
this.hide();
@ -105,7 +105,7 @@ function cloneAndFadeOutActor(actor) {
let hold = new Batch.Hold();
Tweener.addTween(clone,
{ opacity: 0,
time: CLONE_FADE_ANIMATION_TIME,
time: CLONE_FADE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete() {
clone.destroy();

View File

@ -12,7 +12,7 @@ const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
const Params = imports.misc.params;
var SCROLL_TIME = 0.1;
var SCROLL_TIME = 100;
// http://daringfireball.net/2010/07/improved_regex_for_matching_urls
const _balancedParens = '\\([^\\s()<>]+\\)';
@ -428,7 +428,7 @@ function ensureActorVisibleInScrollView(scrollView, actor) {
Tweener.addTween(adjustment,
{ value: value,
time: SCROLL_TIME,
time: SCROLL_TIME / 1000,
transition: 'easeOutQuad' });
}

View File

@ -13,7 +13,7 @@ var APP_ICON_HOVER_TIMEOUT = 200; // milliseconds
var THUMBNAIL_DEFAULT_SIZE = 256;
var THUMBNAIL_POPUP_TIME = 500; // milliseconds
var THUMBNAIL_FADE_TIME = 0.1; // seconds
var THUMBNAIL_FADE_TIME = 100; // milliseconds
var WINDOW_PREVIEW_SIZE = 128;
var APP_ICON_SIZE = 96;
@ -364,7 +364,7 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
let thumbnailsActor = this._thumbnails;
Tweener.addTween(thumbnailsActor,
{ opacity: 0,
time: THUMBNAIL_FADE_TIME,
time: THUMBNAIL_FADE_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
thumbnailsActor.destroy();
@ -395,7 +395,7 @@ class AppSwitcherPopup extends SwitcherPopup.SwitcherPopup {
this._thumbnails.opacity = 0;
Tweener.addTween(this._thumbnails,
{ opacity: 255,
time: THUMBNAIL_FADE_TIME,
time: THUMBNAIL_FADE_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => this.thumbnailsVisible = true
});

View File

@ -7,8 +7,8 @@ const Mainloop = imports.mainloop;
const Tweener = imports.ui.tweener;
var ANIMATED_ICON_UPDATE_TIMEOUT = 16;
var SPINNER_ANIMATION_TIME = 0.3;
var SPINNER_ANIMATION_DELAY = 1.0;
var SPINNER_ANIMATION_TIME = 300;
var SPINNER_ANIMATION_DELAY = 1000;
var Animation = class {
constructor(file, width, height, speed) {
@ -144,8 +144,8 @@ var Spinner = class extends AnimatedIcon {
super.play();
Tweener.addTween(this.actor, {
opacity: 255,
delay: SPINNER_ANIMATION_DELAY,
time: SPINNER_ANIMATION_TIME,
delay: SPINNER_ANIMATION_DELAY / 1000,
time: SPINNER_ANIMATION_TIME / 1000,
transition: 'linear'
});
} else {
@ -160,7 +160,7 @@ var Spinner = class extends AnimatedIcon {
if (this._animate) {
Tweener.addTween(this.actor, {
opacity: 0,
time: SPINNER_ANIMATION_TIME,
time: SPINNER_ANIMATION_TIME / 1000,
transition: 'linear',
onComplete: () => {
super.stop();

View File

@ -29,15 +29,15 @@ var MIN_ROWS = 4;
var INACTIVE_GRID_OPACITY = 77;
// This time needs to be less than IconGrid.EXTRA_SPACE_ANIMATION_TIME
// to not clash with other animations
var INACTIVE_GRID_OPACITY_ANIMATION_TIME = 0.24;
var INACTIVE_GRID_OPACITY_ANIMATION_TIME = 240;
var FOLDER_SUBICON_FRACTION = .4;
var MIN_FREQUENT_APPS_COUNT = 3;
var VIEWS_SWITCH_TIME = 0.4;
var VIEWS_SWITCH_ANIMATION_DELAY = 0.1;
var VIEWS_SWITCH_TIME = 400;
var VIEWS_SWITCH_ANIMATION_DELAY = 100;
var PAGE_SWITCH_TIME = 0.3;
var PAGE_SWITCH_TIME = 300;
const SWITCHEROO_BUS_NAME = 'net.hadess.SwitcherooControl';
const SWITCHEROO_OBJECT_PATH = '/net/hadess/SwitcherooControl';
@ -208,12 +208,12 @@ class BaseAppView {
Tweener.removeTweens(this.actor);
Tweener.removeTweens(this._grid);
let params = { time: VIEWS_SWITCH_TIME,
let params = { time: VIEWS_SWITCH_TIME / 1000,
transition: 'easeOutQuad' };
if (animationDirection == IconGrid.AnimationDirection.IN) {
this.actor.show();
params.opacity = 255;
params.delay = VIEWS_SWITCH_ANIMATION_DELAY;
params.delay = VIEWS_SWITCH_ANIMATION_DELAY / 1000;
} else {
params.opacity = 0;
params.delay = 0;
@ -451,7 +451,7 @@ var AllView = class AllView extends BaseAppView {
if (this._currentPopup && this._displayingPopup &&
animationDirection == IconGrid.AnimationDirection.OUT)
Tweener.addTween(this._currentPopup.actor,
{ time: VIEWS_SWITCH_TIME,
{ time: VIEWS_SWITCH_TIME / 1000,
transition: 'easeOutQuad',
opacity: 0,
onComplete() {
@ -490,9 +490,9 @@ var AllView = class AllView extends BaseAppView {
// Only take the velocity into account on page changes, otherwise
// return smoothly to the current page using the default velocity
if (this._grid.currentPage != pageNumber) {
let minVelocity = totalHeight / (PAGE_SWITCH_TIME * 1000);
let minVelocity = totalHeight / PAGE_SWITCH_TIME;
velocity = Math.max(minVelocity, velocity);
time = (diffToPage / velocity) / 1000;
time = diffToPage / velocity;
} else {
time = PAGE_SWITCH_TIME * diffToPage / totalHeight;
}
@ -503,7 +503,7 @@ var AllView = class AllView extends BaseAppView {
this._grid.currentPage = pageNumber;
Tweener.addTween(this._adjustment,
{ value: this._grid.getPageY(this._grid.currentPage),
time: time,
time: time / 1000,
transition: 'easeOutQuad' });
this._pageIndicators.setCurrentPage(pageNumber);
}
@ -626,7 +626,7 @@ var AllView = class AllView extends BaseAppView {
else
opacity = 255;
params = { opacity: opacity,
time: INACTIVE_GRID_OPACITY_ANIMATION_TIME,
time: INACTIVE_GRID_OPACITY_ANIMATION_TIME / 1000,
transition: 'easeOutQuad' };
Tweener.addTween(this._items[id].actor, params);
}

View File

@ -110,7 +110,7 @@ const COLOR_SHADING_TYPE_KEY = 'color-shading-type';
const BACKGROUND_STYLE_KEY = 'picture-options';
const PICTURE_URI_KEY = 'picture-uri';
var FADE_ANIMATION_TIME = 1.0;
var FADE_ANIMATION_TIME = 1000;
// These parameters affect how often we redraw.
// The first is how different (percent crossfaded) the slide show
@ -712,7 +712,7 @@ var BackgroundManager = class BackgroundManager {
Tweener.addTween(oldBackgroundActor,
{ opacity: 0,
time: FADE_ANIMATION_TIME,
time: FADE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete() {
oldBackgroundActor.destroy();

View File

@ -13,7 +13,7 @@ var PopupAnimation = {
FULL: ~0,
};
var POPUP_ANIMATION_TIME = 0.15;
var POPUP_ANIMATION_TIME = 150;
/**
* BoxPointer:
@ -115,7 +115,7 @@ var BoxPointer = GObject.registerClass({
if (onComplete)
onComplete();
},
time: animationTime });
time: animationTime / 1000 });
}
close(animate, onComplete) {
@ -153,7 +153,7 @@ var BoxPointer = GObject.registerClass({
translation_x: translationX,
translation_y: translationY,
transition: 'linear',
time: animationTime,
time: animationTime / 1000,
onComplete: () => {
this.hide();
this.opacity = 0;

View File

@ -8,7 +8,7 @@ const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
var FROZEN_WINDOW_BRIGHTNESS = -0.3;
var DIALOG_TRANSITION_TIME = 0.15;
var DIALOG_TRANSITION_TIME = 150;
var ALIVE_TIMEOUT = 5000;
var CloseDialog = GObject.registerClass({
@ -152,7 +152,7 @@ var CloseDialog = GObject.registerClass({
Tweener.addTween(this._dialog,
{ scale_y: 1,
transition: 'linear',
time: DIALOG_TRANSITION_TIME,
time: DIALOG_TRANSITION_TIME / 1000,
onComplete: this._onFocusChanged.bind(this)
});
}
@ -179,7 +179,7 @@ var CloseDialog = GObject.registerClass({
Tweener.addTween(dialog,
{ scale_y: 0,
transition: 'linear',
time: DIALOG_TRANSITION_TIME,
time: DIALOG_TRANSITION_TIME / 1000,
onComplete: () => {
dialog.destroy();
}

View File

@ -12,9 +12,9 @@ const IconGrid = imports.ui.iconGrid;
const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
var DASH_ANIMATION_TIME = 0.2;
var DASH_ITEM_LABEL_SHOW_TIME = 0.15;
var DASH_ITEM_LABEL_HIDE_TIME = 0.1;
var DASH_ANIMATION_TIME = 200;
var DASH_ITEM_LABEL_SHOW_TIME = 150;
var DASH_ITEM_LABEL_HIDE_TIME = 100;
var DASH_ITEM_HOVER_TIMEOUT = 300;
function getAppFromSource(source) {
@ -98,7 +98,7 @@ class DashItemContainer extends St.Widget {
this.label.set_position(x, y);
Tweener.addTween(this.label,
{ opacity: 255,
time: DASH_ITEM_LABEL_SHOW_TIME,
time: DASH_ITEM_LABEL_SHOW_TIME / 1000,
transition: 'easeOutQuad',
});
}
@ -111,7 +111,7 @@ class DashItemContainer extends St.Widget {
hideLabel() {
Tweener.addTween(this.label,
{ opacity: 0,
time: DASH_ITEM_LABEL_HIDE_TIME,
time: DASH_ITEM_LABEL_HIDE_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this.label.hide();
@ -140,7 +140,7 @@ class DashItemContainer extends St.Widget {
Tweener.addTween(this,
{ childScale: 1.0,
childOpacity: 255,
time: time,
time: time / 1000,
transition: 'easeOutQuad'
});
}
@ -157,7 +157,7 @@ class DashItemContainer extends St.Widget {
Tweener.addTween(this,
{ childScale: 0.0,
childOpacity: 0,
time: DASH_ANIMATION_TIME,
time: DASH_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this.destroy();
@ -637,7 +637,7 @@ var Dash = class Dash {
Tweener.addTween(icon.icon,
{ width: targetWidth,
height: targetHeight,
time: DASH_ANIMATION_TIME,
time: DASH_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
});
}

View File

@ -9,11 +9,11 @@ const Params = imports.misc.params;
const Tweener = imports.ui.tweener;
// Time to scale down to maxDragActorSize
var SCALE_ANIMATION_TIME = 0.25;
var SCALE_ANIMATION_TIME = 250;
// Time to animate to original position on cancel
var SNAP_BACK_ANIMATION_TIME = 0.25;
var SNAP_BACK_ANIMATION_TIME = 250;
// Time to animate to original position on success
var REVERT_ANIMATION_TIME = 0.75;
var REVERT_ANIMATION_TIME = 750;
var DragMotionResult = {
NO_DROP: 0,
@ -433,7 +433,7 @@ var _Draggable = class _Draggable {
Tweener.addTween(this._dragActor,
{ scale_x: scale * origScale,
scale_y: scale * origScale,
time: SCALE_ANIMATION_TIME,
time: SCALE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onUpdate: () => {
let currentScale = this._dragActor.scale_x / origScale;
@ -663,7 +663,7 @@ var _Draggable = class _Draggable {
y: snapBackY,
scale_x: snapBackScale,
scale_y: snapBackScale,
time: SNAP_BACK_ANIMATION_TIME,
time: SNAP_BACK_ANIMATION_TIME / 1000,
});
}
@ -677,7 +677,7 @@ var _Draggable = class _Draggable {
this._dragActor.opacity = 0;
this._animateDragEnd(eventTime,
{ time: REVERT_ANIMATION_TIME });
{ time: REVERT_ANIMATION_TIME / 1000 });
}
_animateDragEnd(eventTime, params) {

View File

@ -10,9 +10,9 @@ const Main = imports.ui.main;
var ICON_SIZE = 96;
var MIN_ICON_SIZE = 16;
var EXTRA_SPACE_ANIMATION_TIME = 0.25;
var EXTRA_SPACE_ANIMATION_TIME = 250;
var ANIMATION_TIME_IN = 0.350;
var ANIMATION_TIME_IN = 350;
var ANIMATION_TIME_OUT = 1 / 2 * ANIMATION_TIME_IN;
var ANIMATION_MAX_DELAY_FOR_ITEM = 2 / 3 * ANIMATION_TIME_IN;
var ANIMATION_BASE_DELAY_FOR_ITEM = 1 / 4 * ANIMATION_MAX_DELAY_FOR_ITEM;
@ -27,7 +27,7 @@ var AnimationDirection = {
};
var APPICON_ANIMATION_OUT_SCALE = 3;
var APPICON_ANIMATION_OUT_TIME = 0.25;
var APPICON_ANIMATION_OUT_TIME = 250;
var BaseIcon = GObject.registerClass(
class BaseIcon extends St.Bin {
@ -170,7 +170,7 @@ function zoomOutActor(actor) {
let containedY = clamp(scaledY, monitor.y, monitor.y + monitor.height - scaledHeight);
Tweener.addTween(actorClone,
{ time: APPICON_ANIMATION_OUT_TIME,
{ time: APPICON_ANIMATION_OUT_TIME / 1000,
scale_x: APPICON_ANIMATION_OUT_SCALE,
scale_y: APPICON_ANIMATION_OUT_SCALE,
translation_x: containedX - scaledX,
@ -460,14 +460,14 @@ var IconGrid = GObject.registerClass({
let bounceUpTime = ANIMATION_TIME_IN / 4;
let isLastItem = index == actors.length - 1;
Tweener.addTween(actor,
{ time: bounceUpTime,
{ time: bounceUpTime / 1000,
transition: 'easeInOutQuad',
delay: delay,
delay: delay / 1000,
scale_x: ANIMATION_BOUNCE_ICON_SCALE,
scale_y: ANIMATION_BOUNCE_ICON_SCALE,
onComplete: () => {
Tweener.addTween(actor,
{ time: ANIMATION_TIME_IN - bounceUpTime,
{ time: (ANIMATION_TIME_IN - bounceUpTime) / 1000,
transition: 'easeInOutQuad',
scale_x: 1,
scale_y: 1,
@ -536,9 +536,9 @@ var IconGrid = GObject.registerClass({
let delay = (1 - (actor._distance - minDist) / normalization) * ANIMATION_MAX_DELAY_FOR_ITEM;
let [finalX, finalY] = actor._transformedPosition;
movementParams = { time: ANIMATION_TIME_IN,
movementParams = { time: ANIMATION_TIME_IN / 1000,
transition: 'easeInOutQuad',
delay: delay,
delay: delay / 1000,
x: finalX,
y: finalY,
scale_x: 1,
@ -547,9 +547,9 @@ var IconGrid = GObject.registerClass({
if (isLastItem)
this._animationDone();
} };
fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM,
fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM / 1000,
transition: 'easeInOutQuad',
delay: delay,
delay: delay / 1000,
opacity: 255 };
} else {
let isLastItem = actor._distance == maxDist;
@ -558,9 +558,9 @@ var IconGrid = GObject.registerClass({
actorClone.set_position(startX, startY);
let delay = (actor._distance - minDist) / normalization * ANIMATION_MAX_DELAY_OUT_FOR_ITEM;
movementParams = { time: ANIMATION_TIME_OUT,
movementParams = { time: ANIMATION_TIME_OUT / 1000,
transition: 'easeInOutQuad',
delay: delay,
delay: delay / 1000,
x: adjustedSourcePositionX,
y: adjustedSourcePositionY,
scale_x: scaleX,
@ -569,9 +569,9 @@ var IconGrid = GObject.registerClass({
if (isLastItem)
this._animationDone();
} };
fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM,
fadeParams = { time: ANIMATION_FADE_IN_TIME_FOR_ITEM / 1000,
transition: 'easeInOutQuad',
delay: ANIMATION_TIME_OUT + delay - ANIMATION_FADE_IN_TIME_FOR_ITEM,
delay: (ANIMATION_TIME_OUT + delay - ANIMATION_FADE_IN_TIME_FOR_ITEM) / 1000,
opacity: 0 };
}
@ -983,7 +983,7 @@ var PaginatedIconGrid = GObject.registerClass({
for (let i = 0; i < children.length; i++) {
children[i].translation_y = 0;
let params = { translation_y: translationY,
time: EXTRA_SPACE_ANIMATION_TIME,
time: EXTRA_SPACE_ANIMATION_TIME / 1000,
transition: 'easeInOutQuad'
};
if (i == (children.length - 1))
@ -1003,7 +1003,7 @@ var PaginatedIconGrid = GObject.registerClass({
continue;
Tweener.addTween(this._translatedChildren[i],
{ translation_y: 0,
time: EXTRA_SPACE_ANIMATION_TIME,
time: EXTRA_SPACE_ANIMATION_TIME / 1000,
transition: 'easeInOutQuad',
onComplete: () => this.emit('space-closed')
});

View File

@ -13,9 +13,9 @@ const PageIndicators = imports.ui.pageIndicators;
const PopupMenu = imports.ui.popupMenu;
const Tweener = imports.ui.tweener;
var KEYBOARD_REST_TIME = Layout.KEYBOARD_ANIMATION_TIME * 2 * 1000;
var KEYBOARD_REST_TIME = Layout.KEYBOARD_ANIMATION_TIME * 2;
var KEY_LONG_PRESS_TIME = 250;
var PANEL_SWITCH_ANIMATION_TIME = 0.5;
var PANEL_SWITCH_ANIMATION_TIME = 500;
var PANEL_SWITCH_RELATIVE_DISTANCE = 1 / 3; /* A third of the actor width */
const A11Y_APPLICATIONS_SCHEMA = 'org.gnome.desktop.a11y.applications';
@ -695,7 +695,7 @@ var EmojiPager = class EmojiPager {
Tweener.removeTweens(this);
Tweener.addTween(this,
{ delta: value,
time: time,
time: time / 1000,
transition: 'easeInOutQuad',
onComplete() {
this.setCurrentPage(this.getFollowingPage());
@ -711,7 +711,7 @@ var EmojiPager = class EmojiPager {
Tweener.removeTweens(this);
Tweener.addTween(this,
{ delta: 0,
time: time,
time: time / 1000,
transition: 'easeInOutQuad',
});
}
@ -1656,14 +1656,14 @@ var Keyboard = class Keyboard {
if (show) {
Tweener.addTween(windowActor,
{ y: windowActor.y - deltaY,
time: Layout.KEYBOARD_ANIMATION_TIME,
time: Layout.KEYBOARD_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: this._windowSlideAnimationComplete,
onCompleteParams: [window, -deltaY] });
} else {
Tweener.addTween(windowActor,
{ y: windowActor.y + deltaY,
time: Layout.KEYBOARD_ANIMATION_TIME,
time: Layout.KEYBOARD_ANIMATION_TIME / 1000,
transition: 'easeInQuad',
onComplete: this._windowSlideAnimationComplete,
onCompleteParams: [window, deltaY] });

View File

@ -14,9 +14,9 @@ const Params = imports.misc.params;
const Tweener = imports.ui.tweener;
const Ripples = imports.ui.ripples;
var STARTUP_ANIMATION_TIME = 0.5;
var KEYBOARD_ANIMATION_TIME = 0.15;
var BACKGROUND_FADE_ANIMATION_TIME = 1.0;
var STARTUP_ANIMATION_TIME = 500;
var KEYBOARD_ANIMATION_TIME = 150;
var BACKGROUND_FADE_ANIMATION_TIME = 1000;
var HOT_CORNER_PRESSURE_THRESHOLD = 100; // pixels
var HOT_CORNER_PRESSURE_TIMEOUT = 1000; // ms
@ -466,7 +466,7 @@ var LayoutManager = GObject.registerClass({
backgroundActor.opacity = 0;
Tweener.addTween(backgroundActor,
{ opacity: 255,
time: BACKGROUND_FADE_ANIMATION_TIME,
time: BACKGROUND_FADE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad' });
}
}
@ -700,7 +700,7 @@ var LayoutManager = GObject.registerClass({
_startupAnimationGreeter() {
Tweener.addTween(this.panelBox,
{ translation_y: 0,
time: STARTUP_ANIMATION_TIME,
time: STARTUP_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: this._startupAnimationComplete,
onCompleteScope: this });
@ -711,7 +711,7 @@ var LayoutManager = GObject.registerClass({
{ scale_x: 1,
scale_y: 1,
opacity: 255,
time: STARTUP_ANIMATION_TIME,
time: STARTUP_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: this._startupAnimationComplete,
onCompleteScope: this });
@ -743,7 +743,7 @@ var LayoutManager = GObject.registerClass({
Tweener.addTween(this.keyboardBox,
{ anchor_y: this.keyboardBox.height,
opacity: 255,
time: KEYBOARD_ANIMATION_TIME,
time: KEYBOARD_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: this._showKeyboardComplete,
onCompleteScope: this
@ -769,7 +769,7 @@ var LayoutManager = GObject.registerClass({
Tweener.addTween(this.keyboardBox,
{ anchor_y: 0,
opacity: 0,
time: immediate ? 0 : KEYBOARD_ANIMATION_TIME,
time: immediate ? 0 : KEYBOARD_ANIMATION_TIME / 1000,
transition: 'easeInQuad',
onComplete: this._hideKeyboardComplete,
onCompleteScope: this

View File

@ -69,8 +69,8 @@ class RadialShaderEffect extends Shell.GLSLEffect {
* - inhibitEvents: whether to inhibit events for @container
* - width: shade actor width
* - height: shade actor height
* - fadeInTime: seconds used to fade in
* - fadeOutTime: seconds used to fade out
* - fadeInTime: milliseconds used to fade in
* - fadeOutTime: milliseconds used to fade out
*
* Lightbox creates a dark translucent "shade" actor to hide the
* contents of @container, and allows you to specify particular actors
@ -160,7 +160,7 @@ var Lightbox = class Lightbox {
Tweener.addTween(effect,
{ brightness: VIGNETTE_BRIGHTNESS,
vignetteSharpness: VIGNETTE_SHARPNESS,
time: fadeInTime,
time: fadeInTime / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this.shown = true;
@ -171,7 +171,7 @@ var Lightbox = class Lightbox {
Tweener.removeTweens(this.actor);
Tweener.addTween(this.actor,
{ opacity: 255 * this._fadeFactor,
time: fadeInTime,
time: fadeInTime / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this.shown = true;
@ -195,7 +195,7 @@ var Lightbox = class Lightbox {
{ brightness: 1.0,
vignetteSharpness: 0.0,
opacity: 0,
time: fadeOutTime,
time: fadeOutTime / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this.actor.hide();
@ -205,7 +205,7 @@ var Lightbox = class Lightbox {
Tweener.removeTweens(this.actor);
Tweener.addTween(this.actor,
{ opacity: 0,
time: fadeOutTime,
time: fadeOutTime / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this.actor.hide();

View File

@ -34,7 +34,7 @@ var commandHeader = 'const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = im
const HISTORY_KEY = 'looking-glass-history';
// Time between tabs for them to count as a double-tab event
var AUTO_COMPLETE_DOUBLE_TAB_DELAY = 500;
var AUTO_COMPLETE_SHOW_COMPLETION_ANIMATION_DURATION = 0.2;
var AUTO_COMPLETE_SHOW_COMPLETION_ANIMATION_DURATION = 200;
var AUTO_COMPLETE_GLOBAL_KEYWORDS = _getAutoCompleteGlobalKeywords();
function _getAutoCompleteGlobalKeywords() {
@ -952,7 +952,7 @@ var LookingGlass = class LookingGlass {
let settings = St.Settings.get();
this._completionActor.show();
Tweener.removeTweens(this._completionActor);
Tweener.addTween(this._completionActor, { time: AUTO_COMPLETE_SHOW_COMPLETION_ANIMATION_DURATION / settings.slow_down_factor,
Tweener.addTween(this._completionActor, { time: AUTO_COMPLETE_SHOW_COMPLETION_ANIMATION_DURATION / (1000 * settings.slow_down_factor),
transition: 'easeOutQuad',
height: naturalHeight,
opacity: 255
@ -964,7 +964,7 @@ var LookingGlass = class LookingGlass {
if (this._completionActor) {
let settings = St.Settings.get();
Tweener.removeTweens(this._completionActor);
Tweener.addTween(this._completionActor, { time: AUTO_COMPLETE_SHOW_COMPLETION_ANIMATION_DURATION / settings.slow_down_factor,
Tweener.addTween(this._completionActor, { time: AUTO_COMPLETE_SHOW_COMPLETION_ANIMATION_DURATION / (1000 * settings.slow_down_factor),
transition: 'easeOutQuad',
height: 0,
opacity: 0,

View File

@ -7,7 +7,7 @@ const Calendar = imports.ui.calendar;
const Tweener = imports.ui.tweener;
const Util = imports.misc.util;
var MESSAGE_ANIMATION_TIME = 0.1;
var MESSAGE_ANIMATION_TIME = 100;
var DEFAULT_EXPAND_LINES = 6;
@ -442,12 +442,12 @@ var Message = class Message {
if (animate) {
Tweener.addTween(this._bodyStack.layout_manager,
{ expansion: 1,
time: MessageTray.ANIMATION_TIME,
time: MessageTray.ANIMATION_TIME / 1000,
transition: 'easeOutQuad' });
this._actionBin.scale_y = 0;
Tweener.addTween(this._actionBin,
{ scale_y: 1,
time: MessageTray.ANIMATION_TIME,
time: MessageTray.ANIMATION_TIME / 1000,
transition: 'easeOutQuad' });
} else {
this._bodyStack.layout_manager.expansion = 1;
@ -461,11 +461,11 @@ var Message = class Message {
if (animate) {
Tweener.addTween(this._bodyStack.layout_manager,
{ expansion: 0,
time: MessageTray.ANIMATION_TIME,
time: MessageTray.ANIMATION_TIME / 1000,
transition: 'easeOutQuad' });
Tweener.addTween(this._actionBin,
{ scale_y: 0,
time: MessageTray.ANIMATION_TIME,
time: MessageTray.ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this._actionBin.hide();
@ -583,7 +583,7 @@ var MessageListSection = class MessageListSection {
if (animate)
Tweener.addTween(obj.container, { scale_x: 1,
scale_y: 1,
time: MESSAGE_ANIMATION_TIME,
time: MESSAGE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad' });
}
@ -599,12 +599,12 @@ var MessageListSection = class MessageListSection {
this._list.set_child_at_index(obj.container, index);
Tweener.addTween(obj.container, { scale_x: 1,
scale_y: 1,
time: MESSAGE_ANIMATION_TIME,
time: MESSAGE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad' });
};
Tweener.addTween(obj.container, { scale_x: 0,
scale_y: 0,
time: MESSAGE_ANIMATION_TIME,
time: MESSAGE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: onComplete });
}
@ -620,7 +620,7 @@ var MessageListSection = class MessageListSection {
if (animate) {
Tweener.addTween(obj.container, { scale_x: 0, scale_y: 0,
time: MESSAGE_ANIMATION_TIME,
time: MESSAGE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete() {
obj.container.destroy();
@ -650,8 +650,8 @@ var MessageListSection = class MessageListSection {
Tweener.addTween(obj.container,
{ anchor_x: this._list.width,
opacity: 0,
time: MESSAGE_ANIMATION_TIME,
delay: i * delay,
time: MESSAGE_ANIMATION_TIME / 1000,
delay: i * delay / 1000,
transition: 'easeOutQuad',
onComplete() {
message.close();

View File

@ -16,11 +16,11 @@ const Tweener = imports.ui.tweener;
const SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
var ANIMATION_TIME = 0.2;
var NOTIFICATION_TIMEOUT = 4;
var ANIMATION_TIME = 200;
var NOTIFICATION_TIMEOUT = 4000;
var HIDE_TIMEOUT = 0.2;
var LONGER_HIDE_TIMEOUT = 0.6;
var HIDE_TIMEOUT = 200;
var LONGER_HIDE_TIMEOUT = 600;
var MAX_NOTIFICATIONS_IN_QUEUE = 3;
var MAX_NOTIFICATIONS_PER_SOURCE = 3;
@ -1137,7 +1137,7 @@ var MessageTray = class MessageTray {
// We wait just a little before hiding the message tray in case the user quickly moves the mouse back into it.
// We wait for a longer period if the notification popped up where the mouse pointer was already positioned.
// That gives the user more time to mouse away from the notification and mouse back in in order to expand it.
let timeout = this._useLongerNotificationLeftTimeout ? LONGER_HIDE_TIMEOUT * 1000 : HIDE_TIMEOUT * 1000;
let timeout = this._useLongerNotificationLeftTimeout ? LONGER_HIDE_TIMEOUT : HIDE_TIMEOUT;
this._notificationLeftTimeoutId = Mainloop.timeout_add(timeout, this._onNotificationLeftTimeout.bind(this));
GLib.Source.set_name_by_id(this._notificationLeftTimeoutId, '[gnome-shell] this._onNotificationLeftTimeout');
}
@ -1167,7 +1167,7 @@ var MessageTray = class MessageTray {
x < this._notificationLeftMouseX + MOUSE_LEFT_ACTOR_THRESHOLD &&
x > this._notificationLeftMouseX - MOUSE_LEFT_ACTOR_THRESHOLD) {
this._notificationLeftMouseX = -1;
this._notificationLeftTimeoutId = Mainloop.timeout_add(LONGER_HIDE_TIMEOUT * 1000,
this._notificationLeftTimeoutId = Mainloop.timeout_add(LONGER_HIDE_TIMEOUT,
this._onNotificationLeftTimeout.bind(this));
GLib.Source.set_name_by_id(this._notificationLeftTimeoutId, '[gnome-shell] this._onNotificationLeftTimeout');
} else {
@ -1351,7 +1351,7 @@ var MessageTray = class MessageTray {
let tweenParams = { y: 0,
_opacity: 255,
time: ANIMATION_TIME,
time: ANIMATION_TIME / 1000,
transition: 'easeOutBack',
onUpdate: this._clampOpacity,
onUpdateScope: this,
@ -1364,7 +1364,7 @@ var MessageTray = class MessageTray {
_showNotificationCompleted() {
if (this._notification.urgency != Urgency.CRITICAL)
this._updateNotificationTimeout(NOTIFICATION_TIMEOUT * 1000);
this._updateNotificationTimeout(NOTIFICATION_TIMEOUT);
}
_updateNotificationTimeout(timeout) {
@ -1422,7 +1422,7 @@ var MessageTray = class MessageTray {
this._tween(this._bannerBin, '_notificationState', State.HIDDEN,
{ y: -this._bannerBin.height,
_opacity: 0,
time: ANIMATION_TIME,
time: ANIMATION_TIME / 1000,
transition: 'easeOutBack',
onUpdate: this._clampOpacity,
onUpdateScope: this,

View File

@ -10,8 +10,8 @@ const Main = imports.ui.main;
const Params = imports.misc.params;
const Tweener = imports.ui.tweener;
var OPEN_AND_CLOSE_TIME = 0.1;
var FADE_OUT_DIALOG_TIME = 1.0;
var OPEN_AND_CLOSE_TIME = 100;
var FADE_OUT_DIALOG_TIME = 1000;
var State = {
OPENED: 0,
@ -127,7 +127,7 @@ var ModalDialog = GObject.registerClass({
this.show();
Tweener.addTween(this,
{ opacity: 255,
time: this._shouldFadeIn ? OPEN_AND_CLOSE_TIME : 0,
time: this._shouldFadeIn ? OPEN_AND_CLOSE_TIME / 1000 : 0,
transition: 'easeOutQuad',
onComplete: () => {
this._setState(State.OPENED);
@ -179,7 +179,7 @@ var ModalDialog = GObject.registerClass({
if (this._shouldFadeOut)
Tweener.addTween(this,
{ opacity: 0,
time: OPEN_AND_CLOSE_TIME,
time: OPEN_AND_CLOSE_TIME / 1000,
transition: 'easeOutQuad',
onComplete: this._closeComplete.bind(this)
});
@ -251,7 +251,7 @@ var ModalDialog = GObject.registerClass({
this.popModal(timestamp);
Tweener.addTween(this.dialogLayout,
{ opacity: 0,
time: FADE_OUT_DIALOG_TIME,
time: FADE_OUT_DIALOG_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this._setState(State.FADED_OUT);

View File

@ -10,8 +10,8 @@ const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
var HIDE_TIMEOUT = 1500;
var FADE_TIME = 0.1;
var LEVEL_ANIMATION_TIME = 0.1;
var FADE_TIME = 100;
var LEVEL_ANIMATION_TIME = 100;
var OsdWindowConstraint = GObject.registerClass(
class OsdWindowConstraint extends Clutter.Constraint {
@ -112,7 +112,7 @@ var OsdWindow = class {
if (this.actor.visible)
Tweener.addTween(this._level,
{ value: value,
time: LEVEL_ANIMATION_TIME,
time: LEVEL_ANIMATION_TIME / 1000,
transition: 'easeOutQuad' });
else
this._level.value = value;
@ -135,7 +135,7 @@ var OsdWindow = class {
Tweener.addTween(this.actor,
{ opacity: 255,
time: FADE_TIME,
time: FADE_TIME / 1000,
transition: 'easeOutQuad' });
}
@ -158,7 +158,7 @@ var OsdWindow = class {
this._hideTimeoutId = 0;
Tweener.addTween(this.actor,
{ opacity: 0,
time: FADE_TIME,
time: FADE_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this._reset();

View File

@ -17,12 +17,12 @@ const Tweener = imports.ui.tweener;
const WorkspaceThumbnail = imports.ui.workspaceThumbnail;
// Time for initial animation going into Overview mode
var ANIMATION_TIME = 0.25;
var ANIMATION_TIME = 250;
// Must be less than ANIMATION_TIME, since we switch to
// or from the overview completely after ANIMATION_TIME,
// and don't want the shading animation to get cut off
var SHADE_ANIMATION_TIME = .20;
var SHADE_ANIMATION_TIME = 200;
var DND_WINDOW_SWITCH_TIMEOUT = 750;
@ -177,7 +177,7 @@ var Overview = class {
Tweener.addTween(backgrounds[i],
{ brightness: 1.0,
vignette_sharpness: 0.0,
time: SHADE_ANIMATION_TIME,
time: SHADE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad'
});
}
@ -189,7 +189,7 @@ var Overview = class {
Tweener.addTween(backgrounds[i],
{ brightness: Lightbox.VIGNETTE_BRIGHTNESS,
vignette_sharpness: Lightbox.VIGNETTE_SHARPNESS,
time: SHADE_ANIMATION_TIME,
time: SHADE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad'
});
}
@ -429,7 +429,7 @@ var Overview = class {
this._desktopFade.show();
Tweener.addTween(this._desktopFade,
{ opacity: 255,
time: ANIMATION_TIME,
time: ANIMATION_TIME / 1000,
transition: 'easeOutQuad' });
}
@ -446,7 +446,7 @@ var Overview = class {
this._desktopFade.show();
Tweener.addTween(this._desktopFade,
{ opacity: 0,
time: ANIMATION_TIME,
time: ANIMATION_TIME / 1000,
transition: 'easeOutQuad'
});
}
@ -531,7 +531,7 @@ var Overview = class {
Tweener.addTween(this._overview,
{ opacity: 255,
transition: 'easeOutQuad',
time: ANIMATION_TIME,
time: ANIMATION_TIME / 1000,
onComplete: this._showDone,
onCompleteScope: this
});
@ -595,7 +595,7 @@ var Overview = class {
Tweener.addTween(this._overview,
{ opacity: 0,
transition: 'easeOutQuad',
time: ANIMATION_TIME,
time: ANIMATION_TIME / 1000,
onComplete: this._hideDone,
onCompleteScope: this
});

View File

@ -10,7 +10,7 @@ const Tweener = imports.ui.tweener;
const ViewSelector = imports.ui.viewSelector;
const WorkspaceThumbnail = imports.ui.workspaceThumbnail;
var SIDE_CONTROLS_ANIMATION_TIME = 0.16;
var SIDE_CONTROLS_ANIMATION_TIME = 160;
function getRtlSlideDirection(direction, actor) {
let rtl = (actor.text_direction == Clutter.TextDirection.RTL);
@ -128,7 +128,7 @@ var SlidingControl = class {
_updateSlide() {
Tweener.addTween(this.layout, { slideX: this._getSlide(),
time: SIDE_CONTROLS_ANIMATION_TIME,
time: SIDE_CONTROLS_ANIMATION_TIME / 1000,
transition: 'easeOutQuad' });
}
@ -166,7 +166,7 @@ var SlidingControl = class {
this.layout.translationX = translationStart;
Tweener.addTween(this.layout, { translationX: translationEnd,
time: SIDE_CONTROLS_ANIMATION_TIME,
time: SIDE_CONTROLS_ANIMATION_TIME / 1000,
transition: 'easeOutQuad' });
}
@ -197,14 +197,14 @@ var SlidingControl = class {
fadeIn() {
Tweener.addTween(this.actor, { opacity: 255,
time: SIDE_CONTROLS_ANIMATION_TIME / 2,
time: SIDE_CONTROLS_ANIMATION_TIME / (2 * 1000),
transition: 'easeInQuad'
});
}
fadeHalf() {
Tweener.addTween(this.actor, { opacity: 128,
time: SIDE_CONTROLS_ANIMATION_TIME / 2,
time: SIDE_CONTROLS_ANIMATION_TIME / (2 * 1000),
transition: 'easeOutQuad'
});
}

View File

@ -6,17 +6,17 @@ const { Clutter, GObject, St } = imports.gi;
const Tweener = imports.ui.tweener;
const { ANIMATION_TIME_OUT, ANIMATION_MAX_DELAY_OUT_FOR_ITEM, AnimationDirection } = imports.ui.iconGrid;
var INDICATORS_BASE_TIME = 0.25;
var INDICATORS_BASE_TIME_OUT = 0.125;
var INDICATORS_ANIMATION_DELAY = 0.125;
var INDICATORS_ANIMATION_DELAY_OUT = 0.0625;
var INDICATORS_ANIMATION_MAX_TIME = 0.75;
var SWITCH_TIME = 0.4;
var INDICATORS_BASE_TIME = 250;
var INDICATORS_BASE_TIME_OUT = 125;
var INDICATORS_ANIMATION_DELAY = 125;
var INDICATORS_ANIMATION_DELAY_OUT = 62.5;
var INDICATORS_ANIMATION_MAX_TIME = 750;
var SWITCH_TIME = 400;
var INDICATORS_ANIMATION_MAX_TIME_OUT =
Math.min (SWITCH_TIME,
ANIMATION_TIME_OUT + ANIMATION_MAX_DELAY_OUT_FOR_ITEM);
var ANIMATION_DELAY = 0.1;
var ANIMATION_DELAY = 100;
var PageIndicators = GObject.registerClass({
Signals: { 'page-activated': { param_types: [GObject.TYPE_INT] } }
@ -132,9 +132,9 @@ class AnimatedPageIndicators extends PageIndicators {
children[i].translation_x = isAnimationIn ? offset : 0;
Tweener.addTween(children[i], {
translation_x: isAnimationIn ? 0 : offset,
time: baseTime + delay * i,
time: (baseTime + delay * i) / 1000,
transition: 'easeInOutQuad',
delay: isAnimationIn ? ANIMATION_DELAY : 0
delay: isAnimationIn ? ANIMATION_DELAY / 1000 : 0
});
}
}

View File

@ -265,7 +265,7 @@ var AppMenuButton = GObject.registerClass({
Tweener.removeTweens(this);
Tweener.addTween(this,
{ opacity: 255,
time: Overview.ANIMATION_TIME,
time: Overview.ANIMATION_TIME / 1000,
transition: 'easeOutQuad' });
}
@ -278,7 +278,7 @@ var AppMenuButton = GObject.registerClass({
Tweener.removeTweens(this);
Tweener.addTween(this,
{ opacity: 0,
time: Overview.ANIMATION_TIME,
time: Overview.ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this.hide();

View File

@ -19,7 +19,7 @@ const TERMINAL_SCHEMA = 'org.gnome.desktop.default-applications.terminal';
const EXEC_KEY = 'exec';
const EXEC_ARG_KEY = 'exec-arg';
var DIALOG_GROW_TIME = 0.1;
var DIALOG_GROW_TIME = 100;
var RunDialog = GObject.registerClass(
class RunDialog extends ModalDialog.ModalDialog {
@ -245,7 +245,7 @@ class RunDialog extends ModalDialog.ModalDialog {
let parentActor = this._errorBox.get_parent();
Tweener.addTween(parentActor,
{ height: parentActor.height + errorBoxNaturalHeight,
time: DIALOG_GROW_TIME,
time: DIALOG_GROW_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
parentActor.set_height(-1);

View File

@ -34,7 +34,7 @@ var ARROW_DRAG_THRESHOLD = 0.1;
// Parameters for the arrow animation
var N_ARROWS = 3;
var ARROW_ANIMATION_TIME = 0.6;
var ARROW_ANIMATION_TIME = 600;
var ARROW_ANIMATION_PEAK_OPACITY = 0.4;
var ARROW_IDLE_TIME = 30000; // ms
@ -45,9 +45,9 @@ var SUMMARY_ICON_SIZE = 48;
// - MANUAL_FADE_TIME is used for lowering the shield when asked by the user,
// or when cancelling the dialog
// - CURTAIN_SLIDE_TIME is used when raising the shield before unlocking
var STANDARD_FADE_TIME = 10;
var MANUAL_FADE_TIME = 0.3;
var CURTAIN_SLIDE_TIME = 0.3;
var STANDARD_FADE_TIME = 10000;
var MANUAL_FADE_TIME = 300;
var CURTAIN_SLIDE_TIME = 300;
var Clock = class {
constructor() {
@ -737,8 +737,8 @@ var ScreenShield = class {
arrows[i].opacity = 0;
Tweener.addTween(arrows[i],
{ opacity: 0,
delay: unitaryDelay * (N_ARROWS - (i + 1)),
time: ARROW_ANIMATION_TIME,
delay: (unitaryDelay * (N_ARROWS - (i + 1))) / 1000,
time: ARROW_ANIMATION_TIME / 1000,
transition(t, b, c, d) {
if (t < d / 2)
return TweenerEquations.easeOutQuad(t, 0, maxOpacity, d / 2);
@ -788,7 +788,7 @@ var ScreenShield = class {
Tweener.removeTweens(this._lockScreenGroup);
Tweener.addTween(this._lockScreenGroup,
{ y: 0,
time: time,
time: time / 1000,
transition: 'easeInQuad',
onComplete: () => {
this._lockScreenGroup.fixed_position_set = false;
@ -830,8 +830,10 @@ var ScreenShield = class {
let shouldLock = this._settings.get_boolean(LOCK_ENABLED_KEY) && !this._isLocked;
if (shouldLock) {
let lockTimeout = Math.max(STANDARD_FADE_TIME, this._settings.get_uint(LOCK_DELAY_KEY));
this._lockTimeoutId = Mainloop.timeout_add(lockTimeout * 1000,
let lockTimeout = Math.max(
STANDARD_FADE_TIME,
this._settings.get_uint(LOCK_DELAY_KEY) * 1000);
this._lockTimeoutId = Mainloop.timeout_add(lockTimeout,
() => {
this._lockTimeoutId = 0;
this.lock(false);
@ -931,14 +933,14 @@ var ScreenShield = class {
// if velocity is specified, it's in pixels per milliseconds
let h = global.stage.height;
let delta = (h + this._lockScreenGroup.y);
let minVelocity = global.stage.height / (CURTAIN_SLIDE_TIME * 1000);
let minVelocity = global.stage.height / CURTAIN_SLIDE_TIME;
velocity = Math.max(minVelocity, velocity);
let time = (delta / velocity) / 1000;
let time = delta / velocity;
Tweener.addTween(this._lockScreenGroup,
{ y: -h,
time: time,
time: time / 1000,
transition: 'easeInQuad',
onComplete: this._hideLockScreenComplete.bind(this),
});
@ -1004,7 +1006,7 @@ var ScreenShield = class {
Tweener.removeTweens(this._lockScreenGroup);
Tweener.addTween(this._lockScreenGroup,
{ y: 0,
time: MANUAL_FADE_TIME,
time: MANUAL_FADE_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this._lockScreenShown({ fadeToBlack: fadeToBlack,
@ -1096,7 +1098,7 @@ var ScreenShield = class {
if (params.fadeToBlack && params.animateFade) {
// Take a beat
let id = Mainloop.timeout_add(1000 * MANUAL_FADE_TIME, () => {
let id = Mainloop.timeout_add(MANUAL_FADE_TIME, () => {
this._activateFade(this._shortLightbox, MANUAL_FADE_TIME);
return GLib.SOURCE_REMOVE;
});
@ -1217,7 +1219,7 @@ var ScreenShield = class {
Tweener.addTween(this._lockDialogGroup, {
scale_x: 0,
scale_y: 0,
time: animate ? Overview.ANIMATION_TIME : 0,
time: animate ? Overview.ANIMATION_TIME / 1000 : 0,
transition: 'easeOutQuad',
onComplete: this._completeDeactivate.bind(this),
onCompleteScope: this

View File

@ -367,7 +367,7 @@ var PickPixel = class {
};
Signals.addSignalMethods(PickPixel.prototype);
var FLASHSPOT_ANIMATION_OUT_TIME = 0.5; // seconds
var FLASHSPOT_ANIMATION_OUT_TIME = 500; // milliseconds
var Flashspot = class extends Lightbox.Lightbox {
constructor(area) {
@ -384,7 +384,7 @@ var Flashspot = class extends Lightbox.Lightbox {
this.actor.opacity = 255;
Tweener.addTween(this.actor,
{ opacity: 0,
time: FLASHSPOT_ANIMATION_OUT_TIME,
time: FLASHSPOT_ANIMATION_OUT_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
if (doneCallback)

View File

@ -9,8 +9,8 @@ const Tweener = imports.ui.tweener;
var POPUP_DELAY_TIMEOUT = 150; // milliseconds
var POPUP_SCROLL_TIME = 0.10; // seconds
var POPUP_FADE_OUT_TIME = 0.1; // seconds
var POPUP_SCROLL_TIME = 100; // milliseconds
var POPUP_FADE_OUT_TIME = 100; // milliseconds
var DISABLE_HOVER_TIMEOUT = 500; // milliseconds
var NO_MODS_TIMEOUT = 1500; // milliseconds
@ -286,7 +286,7 @@ var SwitcherPopup = GObject.registerClass({
if (this.visible) {
Tweener.addTween(this,
{ opacity: 0,
time: POPUP_FADE_OUT_TIME,
time: POPUP_FADE_OUT_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this.destroy();
@ -463,7 +463,7 @@ var SwitcherList = GObject.registerClass({
this._scrollableRight = true;
Tweener.addTween(adjustment,
{ value: value,
time: POPUP_SCROLL_TIME,
time: POPUP_SCROLL_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
if (this._highlighted == 0)
@ -487,7 +487,7 @@ var SwitcherList = GObject.registerClass({
this._scrollableLeft = true;
Tweener.addTween(adjustment,
{ value: value,
time: POPUP_SCROLL_TIME,
time: POPUP_SCROLL_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
if (this._highlighted == this._items.length - 1)

View File

@ -324,7 +324,7 @@ var ViewSelector = class {
_fadePageIn() {
Tweener.addTween(this._activePage,
{ opacity: 255,
time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME,
time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME / 1000,
transition: 'easeOutQuad'
});
}
@ -333,7 +333,7 @@ var ViewSelector = class {
let oldPage = page;
Tweener.addTween(page,
{ opacity: 0,
time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME,
time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this._animateIn(oldPage);
@ -606,7 +606,7 @@ var ViewSelector = class {
fadeIn() {
let actor = this._activePage;
Tweener.addTween(actor, { opacity: 255,
time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME / 2,
time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME / (2 * 1000),
transition: 'easeInQuad'
});
}
@ -614,7 +614,7 @@ var ViewSelector = class {
fadeHalf() {
let actor = this._activePage;
Tweener.addTween(actor, { opacity: 128,
time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME / 2,
time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME / (2 * 1000),
transition: 'easeOutQuad'
});
}

View File

@ -22,15 +22,15 @@ const SwitchMonitor = imports.ui.switchMonitor;
const { loadInterfaceXML } = imports.misc.fileUtils;
var SHELL_KEYBINDINGS_SCHEMA = 'org.gnome.shell.keybindings';
var MINIMIZE_WINDOW_ANIMATION_TIME = 0.2;
var SHOW_WINDOW_ANIMATION_TIME = 0.15;
var DIALOG_SHOW_WINDOW_ANIMATION_TIME = 0.1;
var DESTROY_WINDOW_ANIMATION_TIME = 0.15;
var DIALOG_DESTROY_WINDOW_ANIMATION_TIME = 0.1;
var WINDOW_ANIMATION_TIME = 0.25;
var MINIMIZE_WINDOW_ANIMATION_TIME = 200;
var SHOW_WINDOW_ANIMATION_TIME = 150;
var DIALOG_SHOW_WINDOW_ANIMATION_TIME = 100;
var DESTROY_WINDOW_ANIMATION_TIME = 150;
var DIALOG_DESTROY_WINDOW_ANIMATION_TIME = 100;
var WINDOW_ANIMATION_TIME = 250;
var DIM_BRIGHTNESS = -0.3;
var DIM_TIME = 0.500;
var UNDIM_TIME = 0.250;
var DIM_TIME = 500;
var UNDIM_TIME = 250;
var MOTION_THRESHOLD = 100;
var ONE_SECOND = 1000; // in ms
@ -419,7 +419,7 @@ var TilePreview = class {
width: tileRect.width,
height: tileRect.height,
opacity: 255,
time: WINDOW_ANIMATION_TIME,
time: WINDOW_ANIMATION_TIME / 1000,
transition: 'easeOutQuad'
});
}
@ -431,7 +431,7 @@ var TilePreview = class {
this._showing = false;
Tweener.addTween(this.actor,
{ opacity: 0,
time: WINDOW_ANIMATION_TIME,
time: WINDOW_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: this._reset.bind(this)
});
@ -1139,7 +1139,7 @@ var WindowManager = class {
Tweener.addTween(switchData.container,
{ x: 0,
y: 0,
time: WINDOW_ANIMATION_TIME,
time: WINDOW_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: this._finishWorkspaceSwitch,
onCompleteScope: this,
@ -1284,7 +1284,7 @@ var WindowManager = class {
if (actor.meta_window.is_monitor_sized()) {
Tweener.addTween(actor,
{ opacity: 0,
time: MINIMIZE_WINDOW_ANIMATION_TIME,
time: MINIMIZE_WINDOW_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: this._minimizeWindowDone,
onCompleteScope: this,
@ -1320,7 +1320,7 @@ var WindowManager = class {
scale_y: yScale,
x: xDest,
y: yDest,
time: MINIMIZE_WINDOW_ANIMATION_TIME,
time: MINIMIZE_WINDOW_ANIMATION_TIME / 1000,
transition: 'easeInExpo',
onComplete: this._minimizeWindowDone,
onCompleteScope: this,
@ -1365,7 +1365,7 @@ var WindowManager = class {
actor.set_scale(1.0, 1.0);
Tweener.addTween(actor,
{ opacity: 255,
time: MINIMIZE_WINDOW_ANIMATION_TIME,
time: MINIMIZE_WINDOW_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: this._unminimizeWindowDone,
onCompleteScope: this,
@ -1402,7 +1402,7 @@ var WindowManager = class {
scale_y: 1.0,
x: xDest,
y: yDest,
time: MINIMIZE_WINDOW_ANIMATION_TIME,
time: MINIMIZE_WINDOW_ANIMATION_TIME / 1000,
transition: 'easeInExpo',
onComplete: this._unminimizeWindowDone,
onCompleteScope: this,
@ -1488,7 +1488,7 @@ var WindowManager = class {
scale_x: scaleX,
scale_y: scaleY,
opacity: 0,
time: WINDOW_ANIMATION_TIME,
time: WINDOW_ANIMATION_TIME / 1000,
transition: 'easeOutQuad'
});
@ -1505,7 +1505,7 @@ var WindowManager = class {
scale_y: 1.0,
translation_x: 0,
translation_y: 0,
time: WINDOW_ANIMATION_TIME,
time: WINDOW_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: this._sizeChangeWindowDone,
onCompleteScope: this,
@ -1586,7 +1586,7 @@ var WindowManager = class {
if (this._shouldAnimate())
Tweener.addTween(dimmer,
{ dimFactor: 1.0,
time: DIM_TIME,
time: DIM_TIME / 1000,
transition: 'linear'
});
else
@ -1603,7 +1603,7 @@ var WindowManager = class {
if (this._shouldAnimate())
Tweener.addTween(dimmer,
{ dimFactor: 0.0,
time: UNDIM_TIME,
time: UNDIM_TIME / 1000,
transition: 'linear' });
else
dimmer.dimFactor = 0.0;
@ -1655,7 +1655,7 @@ var WindowManager = class {
{ opacity: 255,
scale_x: 1,
scale_y: 1,
time: SHOW_WINDOW_ANIMATION_TIME,
time: SHOW_WINDOW_ANIMATION_TIME / 1000,
transition: 'easeOutExpo',
onComplete: this._mapWindowDone,
onCompleteScope: this,
@ -1677,7 +1677,7 @@ var WindowManager = class {
{ opacity: 255,
scale_x: 1,
scale_y: 1,
time: DIALOG_SHOW_WINDOW_ANIMATION_TIME,
time: DIALOG_SHOW_WINDOW_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: this._mapWindowDone,
onCompleteScope: this,
@ -1743,7 +1743,7 @@ var WindowManager = class {
{ opacity: 0,
scale_x: 0.8,
scale_y: 0.8,
time: DESTROY_WINDOW_ANIMATION_TIME,
time: DESTROY_WINDOW_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: this._destroyWindowDone,
onCompleteScope: this,
@ -1768,7 +1768,7 @@ var WindowManager = class {
Tweener.addTween(actor,
{ scale_y: 0,
time: DIALOG_DESTROY_WINDOW_ANIMATION_TIME,
time: DIALOG_DESTROY_WINDOW_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: this._destroyWindowDone,
onCompleteScope: this,
@ -2017,7 +2017,7 @@ var WindowManager = class {
Tweener.addTween(this._switchData.container,
{ x: xDest,
y: yDest,
time: WINDOW_ANIMATION_TIME,
time: WINDOW_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: this._switchWorkspaceDone,
onCompleteScope: this,

View File

@ -613,7 +613,7 @@ var WindowOverlay = class {
let params = { x: x,
y: y,
width: width,
time: Overview.ANIMATION_TIME,
time: Overview.ANIMATION_TIME / 1000,
transition: 'easeOutQuad' };
if (height !== undefined)
@ -650,7 +650,7 @@ var WindowOverlay = class {
a.opacity = 0;
Tweener.addTween(a,
{ opacity: 255,
time: WINDOW_OVERLAY_FADE_TIME,
time: WINDOW_OVERLAY_FADE_TIME / 1000,
transition: 'easeOutQuad' });
});
}
@ -660,7 +660,7 @@ var WindowOverlay = class {
a.opacity = 255;
Tweener.addTween(a,
{ opacity: 0,
time: WINDOW_OVERLAY_FADE_TIME,
time: WINDOW_OVERLAY_FADE_TIME / 1000,
transition: 'easeInQuad' });
});
}
@ -1346,7 +1346,7 @@ var Workspace = class {
Tweener.addTween(clone,
{ opacity: 255,
time: Overview.ANIMATION_TIME,
time: Overview.ANIMATION_TIME / 1000,
transition: 'easeInQuad'
});
}
@ -1389,7 +1389,7 @@ var Workspace = class {
y: y,
scale_x: scale,
scale_y: scale,
time: Overview.ANIMATION_TIME,
time: Overview.ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this._showWindowOverlay(clone, overlay);
@ -1695,7 +1695,7 @@ var Workspace = class {
clone.x = origX;
clone.y = origY;
Tweener.addTween(clone,
{ time: time,
{ time: time / 1000,
opacity: opacity,
transition: 'easeOutQuad'
});
@ -1749,7 +1749,7 @@ var Workspace = class {
y: origY,
scale_x: 1.0,
scale_y: 1.0,
time: Overview.ANIMATION_TIME,
time: Overview.ANIMATION_TIME / 1000,
opacity: 255,
transition: 'easeOutQuad'
});
@ -1759,7 +1759,7 @@ var Workspace = class {
{ scale_x: 0,
scale_y: 0,
opacity: 0,
time: Overview.ANIMATION_TIME,
time: Overview.ANIMATION_TIME / 1000,
transition: 'easeOutQuad'
});
}

View File

@ -7,7 +7,7 @@ const Mainloop = imports.mainloop;
const Main = imports.ui.main;
const Tweener = imports.ui.tweener;
var ANIMATION_TIME = 0.1;
var ANIMATION_TIME = 100;
var DISPLAY_TIMEOUT = 600;
var WorkspaceSwitcherPopupList = GObject.registerClass(
@ -183,7 +183,7 @@ class WorkspaceSwitcherPopup extends St.Widget {
_show() {
Tweener.addTween(this._container, { opacity: 255,
time: ANIMATION_TIME,
time: ANIMATION_TIME / 1000,
transition: 'easeOutQuad'
});
this.show();
@ -205,7 +205,7 @@ class WorkspaceSwitcherPopup extends St.Widget {
Mainloop.source_remove(this._timeoutId);
this._timeoutId = 0;
Tweener.addTween(this._container, { opacity: 0.0,
time: ANIMATION_TIME,
time: ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => this.destroy()
});

View File

@ -15,8 +15,8 @@ const WorkspacesView = imports.ui.workspacesView;
// The maximum size of a thumbnail is 1/10 the width and height of the screen
let MAX_THUMBNAIL_SCALE = 1 / 10.;
var RESCALE_ANIMATION_TIME = 0.2;
var SLIDE_ANIMATION_TIME = 0.2;
var RESCALE_ANIMATION_TIME = 200;
var SLIDE_ANIMATION_TIME = 200;
// When we create workspaces by dragging, we add a "cut" into the top and
// bottom of each workspace so that the user doesn't have to hit the
@ -1039,7 +1039,7 @@ class ThumbnailsBox extends St.Widget {
_tweenScale() {
Tweener.addTween(this,
{ scale: this._targetScale,
time: RESCALE_ANIMATION_TIME,
time: RESCALE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: this._queueUpdateStates,
onCompleteScope: this });
@ -1058,7 +1058,7 @@ class ThumbnailsBox extends St.Widget {
Tweener.addTween(thumbnail,
{ slidePosition: 1,
time: SLIDE_ANIMATION_TIME,
time: SLIDE_ANIMATION_TIME / 1000,
transition: 'linear',
onComplete: () => {
this._setThumbnailState(thumbnail, ThumbnailState.ANIMATED_OUT);
@ -1076,7 +1076,7 @@ class ThumbnailsBox extends St.Widget {
this._setThumbnailState(thumbnail, ThumbnailState.COLLAPSING);
Tweener.addTween(thumbnail,
{ collapseFraction: 1,
time: RESCALE_ANIMATION_TIME,
time: RESCALE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this._stateCounts[thumbnail.state]--;
@ -1105,7 +1105,7 @@ class ThumbnailsBox extends St.Widget {
this._setThumbnailState(thumbnail, ThumbnailState.ANIMATING_IN);
Tweener.addTween(thumbnail,
{ slidePosition: 0,
time: SLIDE_ANIMATION_TIME,
time: SLIDE_ANIMATION_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this._setThumbnailState(thumbnail, ThumbnailState.NORMAL);
@ -1329,7 +1329,7 @@ class ThumbnailsBox extends St.Widget {
this.indicatorY = this._indicator.allocation.y1 + indicatorTopFullBorder;
Tweener.addTween(this,
{ indicatorY: thumbnail.actor.allocation.y1,
time: WorkspacesView.WORKSPACE_SWITCH_TIME,
time: WorkspacesView.WORKSPACE_SWITCH_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this._animatingIndicator = false;

View File

@ -9,7 +9,7 @@ const Tweener = imports.ui.tweener;
const WindowManager = imports.ui.windowManager;
const Workspace = imports.ui.workspace;
var WORKSPACE_SWITCH_TIME = 0.25;
var WORKSPACE_SWITCH_TIME = 250;
var AnimationType = {
ZOOM: 0,
@ -200,7 +200,7 @@ var WorkspacesView = class extends WorkspacesViewBase {
if (showAnimation) {
let tweenParams = Object.assign(params, {
time: WORKSPACE_SWITCH_TIME,
time: WORKSPACE_SWITCH_TIME / 1000,
transition: 'easeOutQuad'
});
// we have to call _updateVisibility() once before the
@ -247,7 +247,7 @@ var WorkspacesView = class extends WorkspacesViewBase {
Tweener.addTween(this.scrollAdjustment, {
value: index,
time: WORKSPACE_SWITCH_TIME,
time: WORKSPACE_SWITCH_TIME / 1000,
transition: 'easeOutQuad',
onComplete: () => {
this._animatingScroll = false;