[gnome-shell] gdm: Remove constraints from authPrompt / loginDialog as well
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] gdm: Remove constraints from authPrompt / loginDialog as well
- Date: Mon, 26 Aug 2013 23:05:32 +0000 (UTC)
commit 41aa14eaf02ce09176e7d4c1f37d1f5e2ddd2faf
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Aug 26 15:47:52 2013 -0400
gdm: Remove constraints from authPrompt / loginDialog as well
https://bugzilla.gnome.org/show_bug.cgi?id=706843
data/theme/gnome-shell.css | 1 +
js/gdm/authPrompt.js | 6 +-----
js/gdm/loginDialog.js | 35 +++++++++++++----------------------
3 files changed, 15 insertions(+), 27 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index 683e303..176d432 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -2271,6 +2271,7 @@ StScrollBar StButton#vhandle:active {
.login-dialog-user-list {
spacing: 12px;
padding: .2em;
+ width: 23em;
}
.login-dialog-user-list-item {
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index 6c26350..73763f3 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -120,7 +120,7 @@ const AuthPrompt = new Lang.Class({
x_align: St.Align.MIDDLE,
y_align: St.Align.END });
- this._defaultButtonWell = new St.Widget();
+ this._defaultButtonWell = new St.Widget({ layout_manager: new Clutter.BinLayout() });
this._defaultButtonWellActor = null;
this._initButtons();
@@ -265,10 +265,6 @@ const AuthPrompt = new Lang.Class({
addActorToDefaultButtonWell: function(actor) {
this._defaultButtonWell.add_child(actor);
-
- actor.add_constraint(new Clutter.AlignConstraint({ source: this._spinner.actor,
- align_axis: Clutter.AlignAxis.BOTH,
- factor: 0.5 }));
},
setActorInDefaultButtonWell: function(actor, animate) {
diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js
index 0e7e549..a4eba2a 100644
--- a/js/gdm/loginDialog.js
+++ b/js/gdm/loginDialog.js
@@ -388,6 +388,7 @@ const LoginDialog = new Lang.Class({
_init: function(parentActor) {
this.actor = new St.Widget({ accessible_role: Atk.Role.WINDOW,
+ layout_manager: new Clutter.BinLayout(),
style_class: 'login-dialog',
visible: false });
@@ -426,11 +427,12 @@ const LoginDialog = new Lang.Class({
Lang.bind(this, this._updateLogoTexture));
this._userSelectionBox = new St.BoxLayout({ style_class: 'login-dialog-user-selection-box',
+ x_align: Clutter.ActorAlign.CENTER,
+ y_align: Clutter.ActorAlign.CENTER,
+ x_expand: true,
+ y_expand: true,
vertical: true,
visible: false });
- this._userSelectionBox.add_constraint(new Clutter.AlignConstraint({ source: this.actor,
- align_axis:
Clutter.AlignAxis.BOTH,
- factor: 0.5 }));
this.actor.add_child(this._userSelectionBox);
this._bannerLabel = new St.Label({ style_class: 'login-dialog-banner',
@@ -448,14 +450,7 @@ const LoginDialog = new Lang.Class({
this._authPrompt.connect('prompted', Lang.bind(this, this._onPrompted));
this._authPrompt.connect('reset', Lang.bind(this, this._onReset));
this._authPrompt.hide();
-
- this._authPrompt.actor.add_constraint(new Clutter.AlignConstraint({ source: this.actor,
- align_axis:
Clutter.AlignAxis.BOTH,
- factor: 0.5 }));
-
this.actor.add_child(this._authPrompt.actor);
- this._userList.actor.add_constraint(new Clutter.BindConstraint({ source: this._authPrompt.actor,
- coordinate:
Clutter.BindCoordinate.WIDTH }));
// translators: this message is shown below the user list on the
// login screen. It can be activated to reveal an entry for
@@ -479,14 +474,11 @@ const LoginDialog = new Lang.Class({
x_align: St.Align.START,
x_fill: true });
- this._logoBin = new St.Bin({ style_class: 'login-dialog-logo-bin', y_expand: true });
- this._logoBin.set_y_align(Clutter.ActorAlign.END);
- this._logoBin.add_constraint(new Clutter.AlignConstraint({ source: this.actor,
- align_axis: Clutter.AlignAxis.X_AXIS,
- factor: 0.5 }));
- this._logoBin.add_constraint(new Clutter.AlignConstraint({ source: this.actor,
- align_axis: Clutter.AlignAxis.Y_AXIS,
- factor: 1.0 }));
+ this._logoBin = new St.Widget({ style_class: 'login-dialog-logo-bin',
+ x_align: Clutter.ActorAlign.CENTER,
+ y_align: Clutter.ActorAlign.END,
+ x_expand: true,
+ y_expand: true });
this.actor.add_child(this._logoBin);
this._updateLogo();
@@ -559,11 +551,10 @@ const LoginDialog = new Lang.Class({
if (this._logoFileUri != uri)
return;
- let icon = null;
+ this._logoBin.destroy_all_children();
if (this._logoFileUri)
- icon = this._textureCache.load_uri_async(this._logoFileUri,
- -1, _LOGO_ICON_HEIGHT);
- this._logoBin.set_child(icon);
+ this._logoBin.add_child(this._textureCache.load_uri_async(this._logoFileUri,
+ -1, _LOGO_ICON_HEIGHT));
},
_updateLogo: function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]