Smarter desktop applet placement

Aaron J. Seigo aseigo at kde.org
Tue Aug 19 19:15:41 CEST 2008


On Monday 18 August 2008, Ambroz Bizjak wrote:
> I have further improved my layout code. Now it can use any of the four
> corners as the "static corner" instead of only top-left. This means if the
> screen shrinks for example, it is not only possible to make the right
> screen border push applets left, but also the left border push applets
> right. And new applets are now placed in the specified corner, not always
> top-left. Adding and removing applets is also handled better now.
> Also, the state of the layout is now properly saved on shutdown and
> restored on startup.

what was the purpose of the change to Plasma::Applet::itemChange? it doesn't 
seem to harm anything, so it's now committed, but i'm wondering what it fixed 
(if anything?) for you.

> Attached is patch for 4.1 and trunk.

patches against trunk are all that's needed; i don't think this is a valid 
candidate for backporting to 4.1.

i've committed the changes to DefaultDesktop (do you have an svn account yet?) 
.. after some more testing, i think it would make sense to find a way to 
integrate this into libplasma so other containments can make use of it.

some things i noticed:

* when adding folderviews, eventually adding a new folderview wouldn't fit 
properly anywhere, though there were several hundred pixels of space below the 
last one, like this:

/----------------------------------------------\
| =========   ========= | |
| | folderview   |    | folderview     |  |
| |                     |   |                       |  | 
| =========  ==========  |
|                                                      |
|                                                      |
\_________________________________/

the new folderviews were placed in the upper left corner, overlapping the first 
folderview. it probably makes sense in that case to place the new applet in 
the empty space below even if it "hangs off" the edge. it should probably only 
stack them in the corner if there is less than a certain % of the needed space 
for the applet required

-- 
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 Trolltech

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20080819/04d41534/attachment.sig 


More information about the Plasma-devel mailing list