Manual Hiding of Plasma Panel (desktop shell)

Andrew Hunt andrzej at ahunt.org
Thu Mar 4 13:34:02 CET 2010


Hi all,

I'm currently working on adding manual panel hiding to the plasma dektop 
panel. ( https://bugs.kde.org/show_bug.cgi?id=158556 for more info.)

Progress has gone quite well, here are a few screens (cut and combined into 
one file):
http://img697.imageshack.us/img697/5606/manualpanel2.png
I am now trying to get the buttons not to cover the contents on the panel (I 
am implementing the hiding in panelview.cpp in case that is of interest). 
Using containment()->setContentsMargins(...) I can successfully set the area 
in which the applets on the panel can be drawn, meaning the problem is almost 
solved, however the toolbox/cashew seems to ignore these constraints, i.e. 
displays itself right at the end of the panel, with only the other content on 
the panel being shifted by the desired amount.
I was wondering what the best method of dealing with this problem would be? 
One possibility I am thinking of is, in the Plasma::Containment class, adding 
a method returning the toolbox, as to allow modifying of its contentMargins. 
Is this acceptable, or are there any better approaches to shifting the cashew?

Also, I have built in an automatic system for determining where to 
place hiding buttons: If a panel is only connected to one side of the screen, 
then the hiding button will be displayed at that side, if it is connected to 
or neither, then I was thinking it should show two buttons, although 
Aaron Seigo suggested having only one (Do most people only use one side -- if 
so which? I use both, with more emphasis on the left...). Does anyone have 
further thoughts on this?

Lastly, I have set up that when the panel height decreases below 25px, the 
buttons increase their width, giving a fat button, much like in Gnome. I have 
noticed that below a certain panel height, the applets bottom section gets 
pushed below the bottom edge of the screen (or top above the top of the 
screen when at the top etc.), however copying this for the hiding complicates 
button placement considerably (as well as making it look silly), so at the 
moment it just resizes with the panel. Would this be the best approach?
-- 
Andrzej JR Hunt -- andrzej (at) ahunt.org


More information about the Plasma-devel mailing list