limiting the focus indicator to the window
This commit is contained in:
parent
3b66787977
commit
2bea439c80
@ -148,6 +148,15 @@ void QskFocusIndicator::updateFocusFrame()
|
|||||||
if ( !r.isEmpty() )
|
if ( !r.isEmpty() )
|
||||||
{
|
{
|
||||||
r = r.marginsAdded( marginsHint( Panel | QskAspect::Padding ) );
|
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 );
|
setGeometry( r );
|
||||||
|
|
||||||
const auto clipRect = qskFocusIndicatorClipRect( m_data->clippingItem );
|
const auto clipRect = qskFocusIndicatorClipRect( m_data->clippingItem );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user