forked from qt-creator/qt-creator
EffectMaker: Fix popup geometry
Effect Maker preview and node combo box popups will now stay within the screen boundaries of the screen the parent combo box belongs to. Fixes: QDS-10512 Change-Id: Ibbfb706499c4b17e27ff5ae471fef8bb9f7384cb Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
@@ -119,6 +119,20 @@ void EffectMakerWidget::focusSection(int section)
|
||||
Q_UNUSED(section)
|
||||
}
|
||||
|
||||
QRect EffectMakerWidget::screenRect() const
|
||||
{
|
||||
if (m_quickWidget && m_quickWidget->screen())
|
||||
return m_quickWidget->screen()->availableGeometry();
|
||||
return {};
|
||||
}
|
||||
|
||||
QPoint EffectMakerWidget::globalPos(const QPoint &point) const
|
||||
{
|
||||
if (m_quickWidget)
|
||||
return m_quickWidget->mapToGlobal(point);
|
||||
return point;
|
||||
}
|
||||
|
||||
QSize EffectMakerWidget::sizeHint() const
|
||||
{
|
||||
return {420, 420};
|
||||
|
||||
Reference in New Issue
Block a user