Ok, I consider my patch feature-complete now. From now on, it works properly with panels and positions proxy widgets properly as well.
To summarize what it provides: - It keeps a working area, that is the area between panels, and only allows applets to be in there (e.g. if a panel is added on top, applets together with the working area are moved downwards). - It places newly added items to an empty place in the working area (old code). - When the screen shrinks, it pushes applets that were left outside of the working area (partially or fully) inside the screen. When pushing an applet, items in its way are also pushed to make space. If the applet already overlappes with other applets, the group of overlapping applets is pushed together as one item. Failing to push the item inside the working area, it is temporarily made visible somewhere else using the old positioning algorithm. The applet is made visible at the original position as soon as it gets back inside the working area. - Inversely, when the screen expands, it pushes applets back towards their preferred positions. About proxy widgets: regular applets report a proper size in their geometry() method when added, however they return useless size hints. On the other hand, proxy applets do exactly the opposite. Strangely, if I assign a new geometry (any) to a proxy applet, its geometry actually gets updated with a good size. So, after calling: applet->setGeometry(applet->geometry()) its size can be read with geometry() as for regular applets. I used that in my code. Because I want to make the layout code as clean as possible, I put the size reading to desktop.cpp, and added an option to the layout to use a specific starting size (or default to PreferredSize hint). Attached is patch for 4.1, for trunk, and the new demo app.
plasma-placement-layout8-kde4.1.patch.bz2
Description: Binary data
plasma-placement-layout8.patch.bz2
Description: Binary data
desktop-layout-demo-0.3.tar.bz2
Description: Binary data
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel