[gnome-shell/wip/background-rework: 10/13] loginDialog: fade out before starting session
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/background-rework: 10/13] loginDialog: fade out before starting session
- Date: Wed, 13 Feb 2013 21:30:07 +0000 (UTC)
commit a73a033c55a8b4e5f4152352854e3a49c627b2b8
Author: Ray Strode <rstrode redhat com>
Date: Wed Feb 6 15:18:22 2013 -0500
loginDialog: fade out before starting session
Right now we very abruptly kill the login screen
and start the users session without any transition
out.
This commit introduces a fade out of the dialog and
panels.
js/gdm/loginDialog.js | 16 +++++++++++++++-
js/ui/screenShield.js | 8 ++++++++
2 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index 75025f2..768413a 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -44,6 +44,7 @@ const PanelMenu = imports.ui.panelMenu;
const Tweener = imports.ui.tweener;
const UserMenu = imports.ui.userMenu;
+const _FADE_ANIMATION_TIME = 0.25;
const _SCROLL_ANIMATION_TIME = 0.5;
const _TIMED_LOGIN_IDLE_THRESHOLD = 5.0;
const _LOGO_ICON_HEIGHT = 16;
@@ -910,7 +911,20 @@ const LoginDialog = new Lang.Class({
},
_onSessionOpened: function(client, serviceName) {
- this._greeter.call_start_session_when_ready_sync(serviceName, true, null);
+ Tweener.addTween(this.dialogLayout,
+ { opacity: 0,
+ time: _FADE_ANIMATION_TIME,
+ transition: 'easeOutQuad',
+ onUpdate: function() {
+ Main.layoutManager.panelBox.opacity = this.dialogLayout.opacity;
+ },
+ onUpdateScope: this,
+ onComplete: function() {
+ Mainloop.idle_add(Lang.bind(this, function() {
+ this._greeter.call_start_session_when_ready_sync(serviceName, true, null);
+ }));
+ },
+ onCompleteScope: this });
},
_waitForItemForUser: function(userName) {
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index ddfea2c..24c91df 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -50,6 +50,7 @@ const SUMMARY_ICON_SIZE = 48;
// SHORT_FADE_TIME is used when requesting lock explicitly from the user menu
const STANDARD_FADE_TIME = 10;
const SHORT_FADE_TIME = 0.3;
+const INITIAL_FADE_IN_TIME = 0.25;
function sample(offx, offy) {
return 'texel += texture2D (sampler, tex_coord.st + pixel_step * ' +
@@ -410,9 +411,16 @@ const ScreenShield = new Lang.Class({
this._lockDialogGroup = new St.Widget({ x_expand: true,
y_expand: true,
+ opacity: 0,
pivot_point: new Clutter.Point({ x: 0.5, y: 0.5 }),
name: 'lockDialogGroup' });
+ Tweener.addTween(this._lockDialogGroup,
+ { opacity: 255,
+ time: INITIAL_FADE_IN_TIME,
+ transition: 'easeInQuad',
+ });
+
this.actor.add_actor(this._lockDialogGroup);
this.actor.add_actor(this._lockScreenGroup);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]