Code refactoring - CaptureWidget: 'screenGeometry' is deprecated

(cherry picked from commit 6adf0b053f41003314b59b8f2e472cd56a280b23)
This commit is contained in:
Yuriy Puchkov
2021-02-22 17:59:54 +02:00
committed by borgmanJeremy
parent d3140a9ad6
commit 93dcc43af3

View File

@@ -661,9 +661,7 @@ void CaptureWidget::wheelEvent(QWheelEvent* e)
m_context.thickness += thicknessOffset;
m_context.thickness = qBound(0, m_context.thickness, 100);
QPoint topLeft =
qApp->desktop()
->screenGeometry(qApp->desktop()->screenNumber(QCursor::pos()))
.topLeft();
QGuiAppCurrentScreen().currentScreen()->geometry().topLeft();
int offset = m_notifierBox->width() / 4;
m_notifierBox->move(mapFromGlobal(topLeft) + QPoint(offset, offset));
m_notifierBox->showMessage(QString::number(m_context.thickness));