[gnome-shell/wip/background-rework: 11/13] loginDialog: clone user avatar when doing verification
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/background-rework: 11/13] loginDialog: clone user avatar when doing verification
- Date: Wed, 13 Feb 2013 21:30:12 +0000 (UTC)
commit cac08822469b55fe40cf2fcb60b84b0409814e7e
Author: Ray Strode <rstrode redhat com>
Date: Wed Feb 6 16:17:27 2013 -0500
loginDialog: clone user avatar when doing verification
Right now, when a user item is clicked we remove all other users from
the list and position the item in the appropriate place on screen.
Ultimately, we're going to want to crossfade from the fully populated
list to the user prompt. Since we're going to need to show the user
avatar in two different positions we can't simply move it.
This commit separates the avatar shown at user verification
into a different actor (a clone).
js/gdm/loginDialog.js | 20 +++++++++++++++++++-
1 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index 768413a..5df550f 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -589,6 +589,12 @@ const LoginDialog = new Lang.Class({
x_fill: true,
y_fill: true,
x_align: St.Align.START });
+ this._promptUser = new St.Bin();
+ this._promptBox.add(this._promptUser,
+ { x_align: St.Align.START,
+ x_fill: true,
+ y_fill: true,
+ expand: true });
this._promptLabel = new St.Label({ style_class: 'login-dialog-prompt-label' });
this._promptBox.add(this._promptLabel,
@@ -838,6 +844,8 @@ const LoginDialog = new Lang.Class({
this._promptBox.hide();
this._promptLoginHint.hide();
+ this._promptUser.set_child(null);
+
this._updateSensitivity(true);
this._promptEntry.set_text('');
@@ -1083,11 +1091,21 @@ const LoginDialog = new Lang.Class({
return hold;
},
+ _setPromptUserFromItem: function(item) {
+ let clone = new Clutter.Clone({ source: item.actor,
+ reactive: false });
+ this._promptUser.set_child(clone);
+ clone.width = item.actor.width;
+ clone.height = item.actor.height;
+ },
+
_onUserListActivated: function(activatedItem) {
let userName;
+ this._setPromptUserFromItem(activatedItem);
+
this._userList.actor.reactive = false;
- this._userList.hideItemsExcept(activatedItem);
+ this._userList.hideItems();
this._notListedButton.hide();
let tasks = [function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]