summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qml/mageiawelcome.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/qml/mageiawelcome.py b/qml/mageiawelcome.py
index c7a320d..3931e99 100644
--- a/qml/mageiawelcome.py
+++ b/qml/mageiawelcome.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
-from PyQt5.QtGui import QGuiApplication, QIcon
+from PyQt5.QtGui import QGuiApplication, QIcon, QScreen
from PyQt5.QtQuick import QQuickView
from PyQt5.QtCore import QUrl, QLocale, QTranslator, QLibraryInfo, QVariant, QAbstractListModel, \
QModelIndex, Qt, QObject, pyqtSlot, pyqtSignal, QCoreApplication
@@ -165,6 +165,11 @@ if __name__ == '__main__':
view.setResizeMode(QQuickView.SizeRootObjectToView)
view.setTitle(app.translate('app',"Welcome to Mageia"))
app.setWindowIcon(QIcon("icons/32x32/apps/mageiawelcome.png"))
+ screen = app.primaryScreen()
+ defaultHeight = 700 * screen.devicePixelRatio()
+ defaultWidth = 1000 * screen.devicePixelRatio()
+ centerPoint = screen.availableGeometry().center()
+ view.setGeometry(centerPoint.x() -defaultWidth/2, centerPoint.y() - defaultHeight/2, defaultWidth,defaultHeight)
cb = Callbrowser()
la = Launcher()
us = username()