global menu bar for gsoc

Aaron J. Seigo aseigo at kde.org
Wed Mar 31 00:36:13 CEST 2010


On March 30, 2010, Ivan Ruchkin wrote:
> 2010/3/29 Aaron J. Seigo <aseigo at kde.org>
> 
> > On March 28, 2010, you wrote:
> > > My name is Ivan, I'd like to improve global Mac-OS style menu bar as my
> > > GSoC project.
> > > Can you please point me to the development code of it?
> > > How does it corellate with XBar plasmoid?
> > 
> > there is a fairly old start to such a plasmoid in:
> >        /trunk/playground/base/plasma/applets/menubar/
> > 
> > it has no relation to the xbar plasmoid, which only works with bespin.
> > 
> > done "right", i think what really ought to happen is this:
> > 
> > * add a "global menubar" option to the Desktop -> Workspace control panel
> > in
> > system settings
> 
> That seems more or less clear. That's systemsettings application
> (kdebase/workspace/systemsettings). But where can I find code that
> configures the exact panel "Desktop->Workspace"?
> 
> > * create a Plasma::Containment of type Panel for the menubar; it would be
> > much
> > like the current Panel containment, but it would have the implementation
> > of the menubar directly inside it, and it would arrange other plasmoids
> > around it. this means that the menubar itself wouldn't be so much a
> > separate plasmoid
> > as it would a Plasma::Contaiment. this would go into
> > kdebase/workspace/plasma/desktop/containments/.
> 
> So, that's a subclass of Plasma::Containment, but most of code is copied
> from Panel and some special features added?

yes. (not that there is all that much code in the Panel containment; and some 
of what is there could probably be done cleaner at this point)

> > top of the screen, it would not be resizeable (always the height of the
> > menubar) and it would not be directly removable (system settings would
> > control
> > it)
> 
> I didn't really get the idea of that passage. I'm a newbie in Plasma, so
> can you please tell me what's the responsibility of PanelView (didn't

PanelView is the actual window. it is a QGraphicsView which views an area of 
the QGraphicsScene (the Corona class), in particular it shows the area of the 
scene on which the panel Containment is. PanelView is responsible for the 
position on screen, autohiding, those sorts of things.

> understand it from docs and code) -- to create Containments like Desktop
> and Panel?

that's handled by the Corona. the View just displays them.

> And what's "that configuration option"?

the "global menubar" option in the Desktop -> Workspace control panel. so when 
the user turns that on, plasma-desktop will then create the menubar view 
automatically. 

this is how it was done, eventually, in kicker in kde3 as well. prior to that 
the user had to set it all up themself: add a new panel, add the menubar 
applet, turn the configuration option on in kcontrol, etc, etc. it was a 
hassle and not clear at all how to do it. so i ended up rewriting it so that 
just turning the option on in kcontrol made kicker set up the panel for the 
user automatically.

this would be the same goal with plasma-desktop.

> About keeping it always on the top of screen: maybe the position (top or
> botton) of menubar should be configured in control panel as well?

does it make any sense to have the menubar at the bottom of the screen? 
(certainly doesn't on the left/right, we know that much for sure ;)

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks


More information about the Plasma-devel mailing list