From fd04c59e638fce912e65efdf630dbaf801cf4bef Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Thu, 16 Aug 2012 22:53:21 +0200 Subject: [PATCH] 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 c3a0fe93f..cc568fbae 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 4483b5bdb..8f2e6c2f6 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();