ScreenShield: bump the lock screen slightly when pressing a key
When pressing a key different from escape (one thus that has no effect), bump the screen up, to indicate that it eats keyboard input and it must be lifted up. https://bugzilla.gnome.org/show_bug.cgi?id=681143
This commit is contained in:
parent
82f7431a28
commit
0171e561f2
@ -22,6 +22,11 @@ const CURTAIN_SLIDE_TIME = 0.8;
|
|||||||
// the slide up automatically
|
// the slide up automatically
|
||||||
const ARROW_DRAG_TRESHOLD = 0.1;
|
const ARROW_DRAG_TRESHOLD = 0.1;
|
||||||
|
|
||||||
|
// The distance in px that the lock screen will move to when pressing
|
||||||
|
// a key that has no effect in the lock screen (bumping it)
|
||||||
|
const BUMP_SIZE = 25;
|
||||||
|
const BUMP_TIME = 0.3;
|
||||||
|
|
||||||
const SUMMARY_ICON_SIZE = 48;
|
const SUMMARY_ICON_SIZE = 48;
|
||||||
|
|
||||||
// Lightbox fading times
|
// Lightbox fading times
|
||||||
@ -337,7 +342,8 @@ const ScreenShield = new Lang.Class({
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
this._bumpLockScreen();
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
_drawArrow: function() {
|
_drawArrow: function() {
|
||||||
@ -412,6 +418,21 @@ const ScreenShield = new Lang.Class({
|
|||||||
this._showUnlockDialog(false);
|
this._showUnlockDialog(false);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_bumpLockScreen: function() {
|
||||||
|
Tweener.removeTweens(this._lockScreenGroup);
|
||||||
|
Tweener.addTween(this._lockScreenGroup,
|
||||||
|
{ y: -BUMP_SIZE,
|
||||||
|
time: BUMP_TIME / 2,
|
||||||
|
transition: 'easeOutQuad',
|
||||||
|
onComplete: function() {
|
||||||
|
Tweener.addTween(this,
|
||||||
|
{ y: 0,
|
||||||
|
time: BUMP_TIME / 2,
|
||||||
|
transition: 'easeInQuad' });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
_showUnlockDialog: function(animate) {
|
_showUnlockDialog: function(animate) {
|
||||||
if (animate) {
|
if (animate) {
|
||||||
// Tween the lock screen out of screen
|
// Tween the lock screen out of screen
|
||||||
|
Loading…
Reference in New Issue
Block a user