First cut at activities overlay
When the user clicks on "Activities", adjust the input shape to the whole screen and show a black overlay group. Actually, the black should be *beneath* the window actors and the overlay group transparent so we can fade in the black while leaving the windows unfaded, visible, but shrunk and rearranged. svn path=/trunk/; revision=14
This commit is contained in:
@ -5,6 +5,11 @@ const Mainloop = imports.mainloop;
|
||||
const Shell = imports.gi.Shell;
|
||||
const Clutter = imports.gi.Clutter;
|
||||
|
||||
// The mutual import here causes things to break in weird ways,
|
||||
// (http://bugzilla.gnome.org/show_bug.cgi?id=558741)
|
||||
// So we do a local import below
|
||||
// const Main = imports.ui.main;
|
||||
|
||||
const PANEL_HEIGHT = 32;
|
||||
const PANEL_BACKGROUND_COLOR = new Clutter.Color();
|
||||
PANEL_BACKGROUND_COLOR.from_pixel(0xeeddccff);
|
||||
@ -17,8 +22,6 @@ Panel.prototype = {
|
||||
_init : function() {
|
||||
let global = Shell.global_get();
|
||||
|
||||
global.set_stage_input_area(0, 0, global.screen_width, PANEL_HEIGHT);
|
||||
|
||||
this._group = new Clutter.Group();
|
||||
|
||||
let background = new Clutter.Rectangle({ color: PANEL_BACKGROUND_COLOR,
|
||||
@ -41,7 +44,14 @@ Panel.prototype = {
|
||||
|
||||
message.connect('button-press-event',
|
||||
function(o, event) {
|
||||
log('Clicked!');
|
||||
// See comment above
|
||||
let Main = imports.ui.main;
|
||||
|
||||
if (Main.overlay.visible)
|
||||
Main.hide_overlay();
|
||||
else
|
||||
Main.show_overlay();
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user