Offset from Plasma Theme?

Marco Martin notmart at gmail.com
Tue Jul 3 11:55:39 UTC 2012


On Mon, Jul 2, 2012 at 6:01 PM, Michail Vourlakos <mvourlakos at gmail.com> wrote:
> actually it works as you can see in the second video but in order to find
> proper x,y for each
> window thumbnail I need:
> 1. x,y of the plasmoid,
> 2. offset of Plasma Theme decoration
> 3. x,y inside the main QML Element
> -so the real x,y is 1+2+3,
> 1. I can find it through the plasmoid geometry,
> 2. I am searching to find, (???)
> 3. I know it of course from inside QML.
>
> Plasma::WindowEffects::showWindowThumbnails needs as first parameter a WId.
> A plasmoid
> I think does not have a WId, instead desktops WId or Dashboard WId is used I
> think through:
>
> view()->winId();

this is correct, is the most reliable (even tough never 100%) way to
get the actual window that is the qgraphicsview.
in cases of popups may be that the view is child of another widget, so
try with view()->effectiveWinId()

then, while you can't really know the width of the plasmoid borders
you don't need it here, you need only to know the borders of the
thumbnails borders, that is whatever svg you used. in FrameSvg you use
getMargins/marginsSize

Cheers,
Marco Martin


More information about the Plasma-devel mailing list