Default Desktop and layout
Alex Merry
kde at randomguy3.me.uk
Mon Aug 25 12:19:22 CEST 2008
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
-------------- 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/c898feb6/attachment.sig
More information about the Plasma-devel
mailing list