authPrompt: Iconize the cancel button

Replace the "Cancel" label in the cancel button
by an arrow icon, and adjust the theme to make
it circular.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922
This commit is contained in:
Umang Jain 2020-01-14 20:45:48 +05:30 committed by Florian Müllner
parent ee0a36e6a3
commit 7fc4fe9a97
2 changed files with 13 additions and 2 deletions

View File

@ -68,6 +68,17 @@
} }
} }
} }
.cancel-button {
padding: 0;
border-radius: 99px;
width: $base_icon_size * 2;
height: $base_icon_size * 2;
border-color: transparentize($bg_color,0.7);
background-color: transparentize($bg_color,0.7);
StIcon { icon-size: $base_icon_size; }
}
} }
.login-dialog-logo-bin { padding: 24px 0px; } .login-dialog-logo-bin { padding: 24px 0px; }

View File

@ -133,13 +133,13 @@ var AuthPrompt = GObject.registerClass({
this.add_child(this._mainBox); this.add_child(this._mainBox);
this.cancelButton = new St.Button({ this.cancelButton = new St.Button({
style_class: 'modal-dialog-button button', style_class: 'modal-dialog-button button cancel-button',
button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE, button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
reactive: true, reactive: true,
can_focus: true, can_focus: true,
label: _("Cancel"),
x_align: Clutter.ActorAlign.START, x_align: Clutter.ActorAlign.START,
y_align: Clutter.ActorAlign.CENTER, y_align: Clutter.ActorAlign.CENTER,
child: new St.Icon({ icon_name: 'go-previous-symbolic' }),
}); });
this.cancelButton.connect('clicked', () => this.cancel()); this.cancelButton.connect('clicked', () => this.cancel());
this._mainBox.add_child(this.cancelButton); this._mainBox.add_child(this.cancelButton);