From 8110970d8e2bc5c8080e382caf0c9e90c61d74cd Mon Sep 17 00:00:00 2001 From: Yuriy Puchkov Date: Wed, 17 Feb 2021 16:52:43 +0200 Subject: [PATCH] fix after mergin - build ubuntu 18.04 --- src/widgets/capture/capturewidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/widgets/capture/capturewidget.cpp b/src/widgets/capture/capturewidget.cpp index c5d963fa..f08d37c1 100644 --- a/src/widgets/capture/capturewidget.cpp +++ b/src/widgets/capture/capturewidget.cpp @@ -813,9 +813,11 @@ void CaptureWidget::showAppUpdateNotification(const QString& appLatestVersion, int ax = (width() - m_updateNotificationWidget->width()) / 2; #elif (defined(Q_OS_LINUX) && QT_VERSION < QT_VERSION_CHECK(5, 10, 0)) QRect helpRect = QGuiApplication::primaryScreen()->geometry(); + int ax = helpRect.left() + + ((helpRect.width() - m_updateNotificationWidget->width()) / 2); #else QRect helpRect; - QScreen* currentScreen = QGuiApplication::screenAt(QCursor::pos()); + QScreen* currentScreen = QGuiAppCurrentScreen().currentScreen(); if (currentScreen) { helpRect = currentScreen->geometry(); } else {