lightpreview: enable highdpi support, set larger default window size
This commit is contained in:
parent
a287eb0c22
commit
7abfec9dc2
|
|
@ -22,6 +22,8 @@ See file, 'COPYING', for details.
|
|||
#include <QSurfaceFormat>
|
||||
#include <QSettings>
|
||||
#include <QCoreApplication>
|
||||
#include <QGuiApplication>
|
||||
#include <QtGlobal>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
|
@ -30,6 +32,12 @@ int main(int argc, char *argv[])
|
|||
QCoreApplication::setOrganizationName("ericw-tools");
|
||||
QCoreApplication::setApplicationName("lightpreview");
|
||||
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
// allow non-integer monitor scaling
|
||||
QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||
#endif
|
||||
|
||||
QApplication a(argc, argv);
|
||||
a.setStyle("fusion");
|
||||
a.setPalette(QPalette(QColor(64, 64, 64)));
|
||||
|
|
|
|||
|
|
@ -124,8 +124,6 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
// create the menu first as it is used by other things (dock widgets)
|
||||
setupMenu();
|
||||
|
||||
resize(640, 480);
|
||||
|
||||
// gl view
|
||||
glView = new GLView(this);
|
||||
setCentralWidget(glView);
|
||||
|
|
@ -136,6 +134,8 @@ MainWindow::MainWindow(QWidget *parent)
|
|||
createOutputLog();
|
||||
|
||||
createStatusBar();
|
||||
|
||||
resize(1024, 768);
|
||||
}
|
||||
|
||||
void MainWindow::createPropertiesSidebar()
|
||||
|
|
|
|||
Loading…
Reference in New Issue