unlockDialog: Remove clutter constraints from the code
These cause annoying allocation cycle warnings, and it's simpler to just express our desired layout in terms of nested containers. Adapt the theme to match as well. https://bugzilla.gnome.org/show_bug.cgi?id=706843
This commit is contained in:
@ -2258,14 +2258,6 @@ StScrollBar StButton#vhandle:active {
|
||||
/* Reset border and background */
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
|
||||
padding-bottom: 80px;
|
||||
padding-top: 80px;
|
||||
|
||||
border-radius: 16px;
|
||||
min-height: 150px;
|
||||
max-height: 700px;
|
||||
min-width: 350px;
|
||||
}
|
||||
|
||||
.login-dialog-button-box {
|
||||
|
@ -34,6 +34,7 @@ const UnlockDialog = new Lang.Class({
|
||||
_init: function(parentActor) {
|
||||
this.actor = new St.Widget({ accessible_role: Atk.Role.WINDOW,
|
||||
style_class: 'login-dialog',
|
||||
layout_manager: new Clutter.BoxLayout(),
|
||||
visible: false });
|
||||
|
||||
this.actor.add_constraint(new Layout.MonitorConstraint({ primary: true }));
|
||||
@ -43,11 +44,12 @@ const UnlockDialog = new Lang.Class({
|
||||
this._userName = GLib.get_user_name();
|
||||
this._user = this._userManager.get_user(this._userName);
|
||||
|
||||
this._promptBox = new St.BoxLayout({ vertical: true });
|
||||
this._promptBox = new St.BoxLayout({ vertical: true,
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
x_expand: true,
|
||||
y_expand: true });
|
||||
this.actor.add_child(this._promptBox);
|
||||
this._promptBox.add_constraint(new Clutter.AlignConstraint({ source: this.actor,
|
||||
align_axis: Clutter.AlignAxis.BOTH,
|
||||
factor: 0.5 }));
|
||||
|
||||
this._authPrompt = new AuthPrompt.AuthPrompt(new Gdm.Client(), AuthPrompt.AuthPromptMode.UNLOCK_ONLY);
|
||||
this._authPrompt.connect('failed', Lang.bind(this, this._fail));
|
||||
|
Reference in New Issue
Block a user