comparison main/main.cpp @ 2300:eb7f4579e5cc by-id

Updates throughout for ModelById logic
author Chris Cannam
date Thu, 04 Jul 2019 14:32:08 +0100
parents c517286ee999
children a1c14880404b
comparison
equal deleted inserted replaced
2299:bb0f5a8f93fe 2300:eb7f4579e5cc
29 #include "plugin/PluginScan.h" 29 #include "plugin/PluginScan.h"
30 #include "plugin/PluginPathSetter.h" 30 #include "plugin/PluginPathSetter.h"
31 31
32 #include <QMetaType> 32 #include <QMetaType>
33 #include <QApplication> 33 #include <QApplication>
34 #include <QDesktopWidget> 34 #include <QScreen>
35 #include <QMessageBox> 35 #include <QMessageBox>
36 #include <QTranslator> 36 #include <QTranslator>
37 #include <QLocale> 37 #include <QLocale>
38 #include <QSettings> 38 #include <QSettings>
39 #include <QIcon> 39 #include <QIcon>
402 QObject::connect(gui, SIGNAL(hideSplash()), splash, SLOT(hide())); 402 QObject::connect(gui, SIGNAL(hideSplash()), splash, SLOT(hide()));
403 QObject::connect(gui, SIGNAL(hideSplash(QWidget *)), 403 QObject::connect(gui, SIGNAL(hideSplash(QWidget *)),
404 splash, SLOT(finishSplash(QWidget *))); 404 splash, SLOT(finishSplash(QWidget *)));
405 } 405 }
406 406
407 QDesktopWidget *desktop = QApplication::desktop(); 407 QScreen *screen = QApplication::primaryScreen();
408 QRect available = desktop->availableGeometry(); 408 QRect available = screen->availableGeometry();
409 409
410 int width = (available.width() * 2) / 3; 410 int width = (available.width() * 2) / 3;
411 int height = available.height() / 2; 411 int height = available.height() / 2;
412 if (height < 450) height = (available.height() * 2) / 3; 412 if (height < 450) height = (available.height() * 2) / 3;
413 if (width > height * 2) width = height * 2; 413 if (width > height * 2) width = height * 2;