[gnome-shell] ScreenShield: use a longer animation when locking manually
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] ScreenShield: use a longer animation when locking manually
- Date: Wed, 13 Feb 2013 14:15:55 +0000 (UTC)
commit 2b1a661614186453e6565806f6cdf59126f8ed6f
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Tue Jan 29 16:04:19 2013 +0100
ScreenShield: use a longer animation when locking manually
The curtain animation looks jerky at its current speed, and more so if
we blank the screen immediately at the end. Make it a little slower and
it becomes more confortable.
https://bugzilla.gnome.org/show_bug.cgi?id=691964
js/ui/screenShield.js | 18 ++++++++++--------
1 files changed, 10 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index 3da3b01..506b60d 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -29,7 +29,6 @@ const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver';
const LOCK_ENABLED_KEY = 'lock-enabled';
const LOCK_DELAY_KEY = 'lock-delay';
-const CURTAIN_SLIDE_TIME = 0.3;
// fraction of screen height the arrow must reach before completing
// the slide up automatically
const ARROW_DRAG_THRESHOLD = 0.1;
@@ -46,11 +45,14 @@ const BUMP_TIME = 0.3;
const SUMMARY_ICON_SIZE = 48;
-// Lightbox fading times
-// STANDARD_FADE_TIME is used when the session goes idle, while
-// SHORT_FADE_TIME is used when requesting lock explicitly from the user menu
+// ScreenShield animation time
+// - STANDARD_FADE_TIME is used when the session goes idle
+// - 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
const STANDARD_FADE_TIME = 10;
-const SHORT_FADE_TIME = 0.3;
+const MANUAL_FADE_TIME = 0.8;
+const CURTAIN_SLIDE_TIME = 0.3;
function sample(offx, offy) {
return 'texel += texture2D (sampler, tex_coord.st + pixel_step * ' +
@@ -689,7 +691,7 @@ const ScreenShield = new Lang.Class({
// restore the lock screen to its original place
// try to use the same speed as the normal animation
let h = global.stage.height;
- let time = CURTAIN_SLIDE_TIME * (-this._lockScreenGroup.y) / h;
+ let time = MANUAL_FADE_TIME * (-this._lockScreenGroup.y) / h;
Tweener.removeTweens(this._lockScreenGroup);
Tweener.addTween(this._lockScreenGroup,
{ y: 0,
@@ -930,7 +932,7 @@ const ScreenShield = new Lang.Class({
Tweener.removeTweens(this._lockScreenGroup);
Tweener.addTween(this._lockScreenGroup,
{ y: 0,
- time: SHORT_FADE_TIME,
+ time: MANUAL_FADE_TIME,
transition: 'easeOutQuad',
onComplete: function() {
this._lockScreenShown();
@@ -947,7 +949,7 @@ const ScreenShield = new Lang.Class({
Tweener.removeTweens(this._lockDialogGroup);
Tweener.addTween(this._lockDialogGroup,
{ opacity: 255,
- time: SHORT_FADE_TIME,
+ time: MANUAL_FADE_TIME,
transition: 'easeOutQuad' });
} else {
this._lockDialogGroup.opacity = 255;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]