[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Default Desktop and layout
From: Alex Merry <kde () randomguy3 ! me ! uk>
Date: 2008-08-25 10:19:22
Message-ID: 200808251119.32239.kde () randomguy3 ! me ! uk
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
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)).
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:
void DefaultDesktop::refreshWorkingArea()
{
QRectF workingGeom;
if (screen() != -1) {
// we are associated with a screen, make sure not to overlap panels
QDesktopWidget *desktop = qApp->desktop();
workingGeom = desktop->availableGeometry(screen());
} else {
workingGeom = geometry();
}
workingGeom.setTopLeft(mapFromScene(workingGeom.topLeft()));
}
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
["signature.asc" (application/pgp-signature)]
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic