[gnome-shell/uajain/adapt-user-avatar-part2: 4/8] authPrompt: Branch out placement of entries and buttons for unlock-mode
- From: Umang Jain <uajain src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/uajain/adapt-user-avatar-part2: 4/8] authPrompt: Branch out placement of entries and buttons for unlock-mode
- Date: Wed, 8 Jan 2020 13:01:48 +0000 (UTC)
commit 646ccda4306147fc352e9e5e6a7c1c9ccb71af14
Author: Umang Jain <mailumangjain gmail com>
Date: Wed Jan 8 17:21:29 2020 +0530
authPrompt: Branch out placement of entries and buttons for unlock-mode
Move cancel button and cog to a single row
js/gdm/authPrompt.js | 40 +++++++++++++++++++++++++++-------------
1 file changed, 27 insertions(+), 13 deletions(-)
---
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index 8f2e2066a4..1b1e91546a 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -156,17 +156,6 @@ var AuthPrompt = GObject.registerClass({
}
_initEntryAndButtons() {
- this.add_child(this._entry);
- this.add_child(this._capsLockWarningLabel);
- this.add_child(this._message);
-
- this._buttonBox = new St.BoxLayout({
- style_class: 'login-dialog-button-box',
- vertical: false,
- y_align: Clutter.ActorAlign.END,
- });
- this.add_child(this._buttonBox);
-
this.cancelButton = new St.Button({
style_class: 'modal-dialog-button button',
button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
@@ -177,10 +166,35 @@ var AuthPrompt = GObject.registerClass({
x_align: Clutter.ActorAlign.START,
y_align: Clutter.ActorAlign.END,
});
+
+ if (this._mode == AuthPromptMode.UNLOCK_ONLY) {
+ let mainBox = new St.BoxLayout({
+ style_class: 'login-dialog-button-box',
+ vertical: false,
+ });
+ this.add_child(mainBox);
+ mainBox.add_child(this.cancelButton);
+ mainBox.add_child(this._entry);
+ mainBox.add_child(this._defaultButtonWell);
+ } else {
+ this._buttonBox = new St.BoxLayout({
+ style_class: 'login-dialog-button-box',
+ vertical: false,
+ y_align: Clutter.ActorAlign.END,
+ });
+ this.add_child(this._entry);
+ this.add_child(this._capsLockWarningLabel);
+
+ this._buttonBox.add_child(this.cancelButton);
+ this._buttonBox.add_child(this._defaultButtonWell);
+ this.add_child(this._buttonBox);
+ }
+ this.add_child(this._capsLockWarningLabel);
+
+ this.add_child(this._message);
+
this.cancelButton.connect('clicked', () => this.cancel());
- this._buttonBox.add_child(this.cancelButton);
- this._buttonBox.add_child(this._defaultButtonWell);
if (this._mode != AuthPromptMode.UNLOCK_ONLY) {
this.nextButton = new St.Button({
style_class: 'modal-dialog-button button',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]