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
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/plasma-devel
