Default Desktop and layout

Alex Merry kde at randomguy3.me.uk
Mon Aug 25 13:41:12 CEST 2008


On Monday 25 August 2008 12:24:26 Petri Damstén wrote:
> On Monday 25 August 2008 13:19:22 Alex Merry wrote:
> > On Monday 25 August 2008 09:28:09 Petri Damstén wrote:
> > > + workingGeom.translate(-desktop->screenGeometry(screen()).topLeft());
> >
> > This is the same as workingGeom.setTopLeft(QPointF(0,0)).
>
> I thought that availableGeometry != screenGeometry so it's not always 0,0.
>
> > If you actually want it in containment co-ordinates, you should probably
> > use mapFromScene(), and you need to do it even if there's no associated
> > screen:
>
> Geometry for containment can be 2571,0,1280,1024 when screenGeometry for it
> is 0,0,1280,1024, so mapFromScene won't return correct value in both cases?

Hmm.  Yes, you're right in both cases.

But I think you still need to correct the value returned by geometry() when 
we're not attached to a screen:

If we have a containment at 2571,0,1280,1024, but not attached to a screen, it 
will try to lay out off the containment (I'm assuming the layout deals in 
containment co-ordinates, rather than scene co-ordinates).

Alex


-- 
Proud KDE hacker: http://www.kde.org
Get KDE 4.1 - out now!
Arch Linux: perfect for geeks like me - http://www.archlinux.org
OpenSUSE: just works - http://www.opensuse.org

-------------- 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/20080825/3c3ab65b/attachment.sig 


More information about the Plasma-devel mailing list