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:
Miikka Heikkinen
2023-11-17 13:19:00 +02:00
parent 5316586a0a
commit a2b195580b
4 changed files with 86 additions and 34 deletions

View File

@@ -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};