UnlockDialog: add an explicit cancel button
Pressing escape to cancelling the unlock procedure is not discoverable enough. At the same time, fix styling to avoid bluish hover effects. https://bugzilla.gnome.org/show_bug.cgi?id=681143
This commit is contained in:
parent
f8b1a84b81
commit
fd04c59e63
@ -2173,7 +2173,7 @@ StButton.popup-menu-item:insensitive {
|
|||||||
|
|
||||||
|
|
||||||
.login-dialog .modal-dialog-button {
|
.login-dialog .modal-dialog-button {
|
||||||
border: 1px solid white;
|
border: 1px solid #666666;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 3px 18px;
|
padding: 3px 18px;
|
||||||
}
|
}
|
||||||
@ -2185,13 +2185,13 @@ StButton.popup-menu-item:insensitive {
|
|||||||
border: 2px solid #16335d;
|
border: 2px solid #16335d;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog .modal-dialog-button:hover {
|
.login-dialog .modal-dialog-button:default:hover {
|
||||||
background-gradient-start: #74a0d0;
|
background-gradient-start: #74a0d0;
|
||||||
background-gradient-end: #436d9f;
|
background-gradient-end: #436d9f;
|
||||||
}
|
}
|
||||||
|
|
||||||
.login-dialog .modal-dialog-button:active,
|
.login-dialog .modal-dialog-button:default:active,
|
||||||
.login-dialog .modal-dialog-button:pressed {
|
.login-dialog .modal-dialog-button:default:pressed {
|
||||||
background-gradient-start: #436d9f;
|
background-gradient-start: #436d9f;
|
||||||
background-gradient-end: #74a0d0;
|
background-gradient-end: #74a0d0;
|
||||||
}
|
}
|
||||||
|
@ -126,11 +126,13 @@ const UnlockDialog = new Lang.Class({
|
|||||||
this._promptFingerprintMessage.hide();
|
this._promptFingerprintMessage.hide();
|
||||||
this.contentLayout.add_actor(this._promptFingerprintMessage);
|
this.contentLayout.add_actor(this._promptFingerprintMessage);
|
||||||
|
|
||||||
|
let cancelButton = { label: _("Cancel"),
|
||||||
|
action: Lang.bind(this, this._escape),
|
||||||
|
key: Clutter.KEY_Escape };
|
||||||
this._okButton = { label: _("Unlock"),
|
this._okButton = { label: _("Unlock"),
|
||||||
action: Lang.bind(this, this._doUnlock),
|
action: Lang.bind(this, this._doUnlock),
|
||||||
default: true };
|
default: true };
|
||||||
this.setButtons([this._okButton]);
|
this.setButtons([cancelButton, this._okButton]);
|
||||||
this.setActionKey(Clutter.KEY_Escape, Lang.bind(this, this._escape));
|
|
||||||
|
|
||||||
this._updateOkButton(false);
|
this._updateOkButton(false);
|
||||||
this._reset();
|
this._reset();
|
||||||
|
Loading…
Reference in New Issue
Block a user