limiting the focus indicator to the window

This commit is contained in:
Uwe Rathmann 2020-07-15 12:45:20 +02:00
parent 3b66787977
commit 2bea439c80

View File

@ -148,6 +148,15 @@ void QskFocusIndicator::updateFocusFrame()
if ( !r.isEmpty() )
{
r = r.marginsAdded( marginsHint( Panel | QskAspect::Padding ) );
if ( auto w = window() )
{
QRectF clipRect( 0, 0, w->width(), w->height() );
clipRect = parentItem()->mapRectFromScene( clipRect );
r = r.intersected( clipRect );
}
setGeometry( r );
const auto clipRect = qskFocusIndicatorClipRect( m_data->clippingItem );