ScreenShield: implement curtain design

This separates the screen shield into two main screens. One is
the lock screen, and it is shown when coming back from idle status
and when failing authentication. The other is the actual unlock
dialog.
Moving from the first to the second is possible by pressing Escape
or by dragging an arrow on the bottom on the screen.

https://bugzilla.gnome.org/show_bug.cgi?id=619955
This commit is contained in:
Giovanni Campagna
2012-05-24 22:47:48 +02:00
parent 54dc0fd123
commit c0652bcd8f
5 changed files with 161 additions and 42 deletions

View File

@ -41,14 +41,9 @@ const LayoutManager = new Lang.Class({
Lang.bind(this, this._updatePanelBarriers));
this.screenShieldGroup = new St.Widget({ name: 'screenShieldGroup',
visible: false
visible: false,
clip_to_allocation: true,
});
// FIXME: This is going to slow everything down by a big factor
// Need a better solution (like a layout manager?)
let constraint = new Clutter.BindConstraint({ source: global.stage,
coordinate: Clutter.BindCoordinate.ALL
});
this.screenShieldGroup.add_constraint(constraint);
this.addChrome(this.screenShieldGroup);
this.trayBox = new St.BoxLayout({ name: 'trayBox' });
@ -161,6 +156,9 @@ const LayoutManager = new Lang.Class({
},
_updateBoxes: function() {
this.screenShieldGroup.set_position(0, 0);
this.screenShieldGroup.set_size(global.screen_width, global.screen_height);
this.panelBox.set_position(this.primaryMonitor.x, this.primaryMonitor.y);
this.panelBox.set_size(this.primaryMonitor.width, -1);