Re: getting rid of topbar



On Wed, Jul 13, 2011 at 11:40 PM, Artur Wroblewski
<wrobell pld-linux org> wrote:
> Any tips how to simplify the code above?

Thanks to

  https://bugzilla.gnome.org/show_bug.cgi?id=654518

I have the following code, which works

-------
const Main = imports.ui.main;

function _hidePanel() {
    Main.chrome.removeActor(Main.panel.actor);
    Main.chrome.addActor(Main.panel.actor, { affectsStruts: false });
    Main.panel.actor.hide();
    Main.panel._leftCorner.actor.hide();
    Main.panel._rightCorner.actor.hide();
}

function _showPanel() {
    Main.chrome.removeActor(Main.panel.actor);
    Main.chrome.addActor(Main.panel.actor, { affectsStruts: true });
    Main.panel.actor.show();
}

function main() {
    _hidePanel()
    Main.overview.connect('showing', _showPanel);
    Main.overview.connect('hiding', _hidePanel);
}
-------

I would really appreciate explanation why the code has to be so
complex? IMHO, simple Main.panle.actor.hide should be intuitive
enough. What's its other purpose? Why it does not hide whole
panel (API (?), i.e. "panel._leftCorner" suggests that corners are part
of the topbar).

Is it intrusive (as explained in bugzilla, see link above)? Of course, it is
as it hides the panel...

Any answers and pointers to documentation or code highly appreciated.

Best regards,

Artur


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]