GUI: Remove usage of QDesktopWidget

QDesktopWidget is obsolete and some of its methods don't work correctly.
Remove all code related to QDesktopWidget.
This commit is contained in:
Sude 2019-09-04 12:57:29 +03:00
parent fe494e8e74
commit 50972aaafe

View File

@ -9,9 +9,7 @@
#include <QApplication>
#include <QtWidgets/QWidget>
#include <QtWebEngineWidgets/QWebEngineView>
#include <QStyle>
#include <QLayout>
#include <QDesktopWidget>
#include <QWebEngineProfile>
GuiLogin::GuiLogin()
@ -103,16 +101,7 @@ void GuiLogin::Login(const std::string& username, const std::string& password)
QWidget window;
QVBoxLayout *layout = new QVBoxLayout;
QSize window_size(440, 540);
window.setGeometry(
QStyle::alignedRect(
Qt::LeftToRight,
Qt::AlignCenter,
window_size,
qApp->desktop()->availableGeometry()
)
);
window.resize(440, 540);
QWebEngineView *webengine = new QWebEngineView(&window);
layout->addWidget(webengine);