panel: Switch to fully dynamic layout

There was lots of fixed positioning in the Panel; now it is completely
dynamic, and width/height is driven from main.js.  We still have a
global constant Panel.PANEL_HEIGHT, but this is a big step towards
eliminating it.

Also, this avoids overdraw in the "way too many tray icons" case.  The
clock will shift left.
This commit is contained in:
Colin Walters
2009-08-11 11:16:25 -04:00
parent e6644b7feb
commit e330c5ea17
3 changed files with 128 additions and 49 deletions

View File

@ -77,6 +77,8 @@ function start() {
}
});
_relayout();
panel.startupAnimation();
let display = global.screen.get_display();
@ -86,6 +88,12 @@ function start() {
Mainloop.idle_add(_removeUnusedWorkspaces);
}
function _relayout() {
let global = Shell.Global.get();
panel.actor.set_size(global.screen_width, Panel.PANEL_HEIGHT);
overview.relayout();
}
// metacity-clutter currently uses the same prefs as plain metacity,
// which probably means we'll be starting out with multiple workspaces;
// remove any unused ones. (We do this from an idle handler, because