diff -r e4f038c420f7 -r 3ac3aaebaee5 homescreenapp/hsdomainmodel/src/hswidgethostvisual.cpp --- a/homescreenapp/hsdomainmodel/src/hswidgethostvisual.cpp Mon Sep 13 13:03:23 2010 +0300 +++ b/homescreenapp/hsdomainmodel/src/hswidgethostvisual.cpp Mon Sep 20 10:19:07 2010 +0300 @@ -84,17 +84,19 @@ QPainterPath path; if (mWidget) { - QRectF currRect = rect(); + QRectF visualRect = rect(); path = mWidget->shape(); - QRectF pathRect(path.boundingRect()); + QRectF widgetRect(path.boundingRect()); + if (widgetRect.width() > visualRect.width() + || widgetRect.height() > visualRect.height()) { + QPainterPath newPath; + newPath.addRect(visualRect); + path = path.intersected(newPath); + } else if ( widgetRect.isEmpty() ) { + path.addRect(visualRect); + } - if (pathRect.width() > currRect.width() - || pathRect.height() > currRect.height()) { - QPainterPath newPath(currRect.topLeft()); - newPath.addRect(currRect); - path = path.intersected(newPath); - } } return path; }