From d1eefcf5079a3a91f569dbb73fc2f424f368fbd2 Mon Sep 17 00:00:00 2001 From: Craig Watson Date: Wed, 23 Mar 2016 16:34:56 +0100 Subject: [PATCH] Fixed widget full-screening on OS X (widgets' size and position weren't necessarily calculated based on their current screen, but on the entire desktop geometry) This also fixes the skewing observed during podcast recording --- src/frameworks/UBPlatformUtils_mac.mm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/frameworks/UBPlatformUtils_mac.mm b/src/frameworks/UBPlatformUtils_mac.mm index 8f8c667d..6da6396f 100644 --- a/src/frameworks/UBPlatformUtils_mac.mm +++ b/src/frameworks/UBPlatformUtils_mac.mm @@ -592,10 +592,9 @@ void UBPlatformUtils::showFullScreen(QWidget *pWidget) * screen area minus the menu bar and dock area). So we have to manually resize it to the * total screen height, and move it up to the top of the screen (y=0 position). */ - QDesktopWidget * desktop = QApplication::desktop(); - pWidget->resize(pWidget->width(), desktop->screenGeometry().height()); - pWidget->move(pWidget->pos().x(), 0); - + QRect currentScreenRect = QApplication::desktop()->screenGeometry(pWidget); + pWidget->resize(currentScreenRect.width(), currentScreenRect.height()); + pWidget->move(currentScreenRect.left(), currentScreenRect.top()); }