updates, when the window size is changing
This commit is contained in:
parent
ddbc5db920
commit
63cb3bde5d
|
@ -55,6 +55,11 @@ void QskFocusIndicator::onFocusItemGeometryChanged()
|
||||||
updateFocusFrame();
|
updateFocusFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QskFocusIndicator::onWindowSizeChanged( int )
|
||||||
|
{
|
||||||
|
updateFocusFrame();
|
||||||
|
}
|
||||||
|
|
||||||
void QskFocusIndicator::onFocusItemDestroyed()
|
void QskFocusIndicator::onFocusItemDestroyed()
|
||||||
{
|
{
|
||||||
m_data->resetConnections();
|
m_data->resetConnections();
|
||||||
|
@ -170,11 +175,23 @@ void QskFocusIndicator::connectWindow( const QQuickWindow* window, bool on )
|
||||||
{
|
{
|
||||||
connect( window, &QQuickWindow::activeFocusItemChanged,
|
connect( window, &QQuickWindow::activeFocusItemChanged,
|
||||||
this, &QskFocusIndicator::onFocusItemChanged );
|
this, &QskFocusIndicator::onFocusItemChanged );
|
||||||
|
|
||||||
|
connect( window, &QQuickWindow::widthChanged,
|
||||||
|
this, &QskFocusIndicator::onWindowSizeChanged );
|
||||||
|
|
||||||
|
connect( window, &QQuickWindow::heightChanged,
|
||||||
|
this, &QskFocusIndicator::onWindowSizeChanged );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
disconnect( window, &QQuickWindow::activeFocusItemChanged,
|
disconnect( window, &QQuickWindow::activeFocusItemChanged,
|
||||||
this, &QskFocusIndicator::onFocusItemChanged );
|
this, &QskFocusIndicator::onFocusItemChanged );
|
||||||
|
|
||||||
|
disconnect( window, &QQuickWindow::widthChanged,
|
||||||
|
this, &QskFocusIndicator::onWindowSizeChanged );
|
||||||
|
|
||||||
|
disconnect( window, &QQuickWindow::heightChanged,
|
||||||
|
this, &QskFocusIndicator::onWindowSizeChanged );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,10 +26,10 @@ protected:
|
||||||
virtual void windowChangeEvent( QskWindowChangeEvent* ) override;
|
virtual void windowChangeEvent( QskWindowChangeEvent* ) override;
|
||||||
virtual QRectF focusRect() const;
|
virtual QRectF focusRect() const;
|
||||||
|
|
||||||
private Q_SLOTS:
|
|
||||||
void onFocusItemGeometryChanged();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void onFocusItemGeometryChanged();
|
||||||
|
void onWindowSizeChanged( int );
|
||||||
|
|
||||||
void onFocusItemChanged();
|
void onFocusItemChanged();
|
||||||
void onFocusItemDestroyed();
|
void onFocusItemDestroyed();
|
||||||
void updateFocusFrame();
|
void updateFocusFrame();
|
||||||
|
|
Loading…
Reference in New Issue