[gnome-shell] UnlockDialog: add an explicit cancel button
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] UnlockDialog: add an explicit cancel button
- Date: Thu, 16 Aug 2012 21:19:03 +0000 (UTC)
commit fd04c59e638fce912e65efdf630dbaf801cf4bef
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Thu Aug 16 22:53:21 2012 +0200
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
data/theme/gnome-shell.css | 8 ++++----
js/ui/unlockDialog.js | 6 ++++--
2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index c3a0fe9..cc568fb 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -2173,7 +2173,7 @@ StButton.popup-menu-item:insensitive {
.login-dialog .modal-dialog-button {
- border: 1px solid white;
+ border: 1px solid #666666;
border-radius: 5px;
padding: 3px 18px;
}
@@ -2185,13 +2185,13 @@ StButton.popup-menu-item:insensitive {
border: 2px solid #16335d;
}
-.login-dialog .modal-dialog-button:hover {
+.login-dialog .modal-dialog-button:default:hover {
background-gradient-start: #74a0d0;
background-gradient-end: #436d9f;
}
-.login-dialog .modal-dialog-button:active,
-.login-dialog .modal-dialog-button:pressed {
+.login-dialog .modal-dialog-button:default:active,
+.login-dialog .modal-dialog-button:default:pressed {
background-gradient-start: #436d9f;
background-gradient-end: #74a0d0;
}
diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js
index 4483b5b..8f2e6c2 100644
--- a/js/ui/unlockDialog.js
+++ b/js/ui/unlockDialog.js
@@ -126,11 +126,13 @@ const UnlockDialog = new Lang.Class({
this._promptFingerprintMessage.hide();
this.contentLayout.add_actor(this._promptFingerprintMessage);
+ let cancelButton = { label: _("Cancel"),
+ action: Lang.bind(this, this._escape),
+ key: Clutter.KEY_Escape };
this._okButton = { label: _("Unlock"),
action: Lang.bind(this, this._doUnlock),
default: true };
- this.setButtons([this._okButton]);
- this.setActionKey(Clutter.KEY_Escape, Lang.bind(this, this._escape));
+ this.setButtons([cancelButton, this._okButton]);
this._updateOkButton(false);
this._reset();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]