summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 506c6270..8eee41e4 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -697,16 +697,7 @@ int runApplication(MOApplication &application, SingleInstance &instance,
QPixmap pixmap(splashPath);
QSplashScreen splash(pixmap);
- const auto monitor = settings.geometry().getMainWindowMonitor();
- if (monitor && QGuiApplication::screens().size() > *monitor) {
- QGuiApplication::screens().at(*monitor)->geometry().center();
- const QPoint center = QGuiApplication::screens().at(*monitor)->geometry().center();
- splash.move(center - splash.rect().center());
- } else {
- const QPoint center = QGuiApplication::primaryScreen()->geometry().center();
- splash.move(center - splash.rect().center());
- }
-
+ settings.geometry().centerOnMainWindowMonitor(&splash);
splash.show();
splash.activateWindow();