Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 760cc2b7 authored by Hugo Pereira Da Costa's avatar Hugo Pereira Da Costa

set a mask to shadow widget to make sure that it does not overlap with the mdi window.

parent afcd6335
......@@ -56,7 +56,8 @@ namespace Breeze
const int rightSize( size );
// get tileSet rect
_shadowTilesRect = _widget->frameGeometry().adjusted( -leftSize, -topSize, rightSize, bottomSize );
auto hole = _widget->frameGeometry();
_shadowTilesRect = hole.adjusted( -leftSize, -topSize, rightSize, bottomSize );
// get parent MDI area's viewport
QWidget *parent( parentWidget() );
......@@ -68,8 +69,15 @@ namespace Breeze
// set geometry
QRect geometry( _shadowTilesRect );
if( parent ) geometry &= parent->rect();
if( parent )
geometry &= parent->rect();
hole &= parent->rect();
// update geometry and mask
setGeometry( geometry );
setMask( QRegion( rect() ) - hole.translated( -geometry.topLeft() ) );
// translate rendering rect
_shadowTilesRect.translate( -geometry.topLeft() );
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment