Use QScreen instead of QDesktopWidget::screen

This commit is contained in:
Roland Rossgotterer
2019-02-25 10:34:39 +01:00
committed by Mat Sutcliffe
parent c82ff139fe
commit 338d4d0cdb
2 changed files with 5 additions and 2 deletions

View File

@@ -21,6 +21,7 @@
#include <QLayoutItem>
#include <QMenu>
#include <QScopedPointer>
#include <QScreen>
#include <QSettings>
#include <QSizePolicy>
#include <QStatusBar>
@@ -616,6 +617,6 @@ namespace BlackGui
{
// center on screen when floating
if (!this->isFloating()) { return; }
this->move(QApplication::desktop()->screen()->rect().center() - this->rect().center());
this->move(sGui->currentScreen()->geometry().center() - this->rect().center());
}
} // namespace