From 35ac949f44ddb111a75686e7fbbf33ce01346e84 Mon Sep 17 00:00:00 2001 From: MuldeR Date: Fri, 24 Mar 2017 21:14:45 +0100 Subject: [PATCH] Some improvements to "high DPI" support. --- src/MainWindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 3c34b16..c040239 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -101,6 +101,9 @@ CMainWindow::CMainWindow(const QString &tempFolder, MUtils::IPCChannel *const ip //Setup Icon MUtils::GUI::set_window_icon(this, QIcon(":/res/logo.png"), true); + //Adjust size to DPI settings and re-center + MUtils::GUI::scale_widget(this); + //Setup links ui->actionLink_MuldeR ->setData(QVariant(QString::fromLatin1(LINK_MULDER))); ui->actionLink_MediaInfo->setData(QVariant(QString::fromLatin1(LINK_MEDIAINFO))); @@ -169,7 +172,6 @@ CMainWindow::~CMainWindow(void) void CMainWindow::showEvent(QShowEvent *event) { QMainWindow::showEvent(event); - resize(this->minimumSize()); //Init test ui->versionLabel->setText(QString("v%1 / v%2 (%3)").arg(QString().sprintf("%u.%02u", g_mixp_versionMajor, g_mixp_versionMinor), QString().sprintf("%u.%u.%02u", g_mixp_miVersionMajor, g_mixp_miVersionMinor, g_mixp_miVersionPatch), MUtils::Version::app_build_date().toString(Qt::ISODate)));