From 548a86e707f47c6814287547abb67c4317988b6c Mon Sep 17 00:00:00 2001 From: lordmulder Date: Fri, 12 Oct 2018 20:31:30 +0200 Subject: [PATCH] Some improvements to initial window size on "High DPI" screens. --- src/version.h | 2 +- src/win_main.cpp | 3 +++ src/win_updater.cpp | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/version.h b/src/version.h index d6757d5..359706a 100644 --- a/src/version.h +++ b/src/version.h @@ -26,7 +26,7 @@ #define VER_X264_MAJOR 2 #define VER_X264_MINOR 8 #define VER_X264_PATCH 8 -#define VER_X264_BUILD 1130 +#define VER_X264_BUILD 1138 #define VER_X264_PORTABLE_EDITION (0) diff --git a/src/win_main.cpp b/src/win_main.cpp index 82c17e2..2e1ee9b 100644 --- a/src/win_main.cpp +++ b/src/win_main.cpp @@ -141,6 +141,9 @@ MainWindow::MainWindow(const MUtils::CPUFetaures::cpu_info_t &cpuFeatures, MUtil m_options.reset(new OptionsModel(m_sysinfo.data())); OptionsModel::loadTemplate(m_options.data(), QString::fromLatin1(tpl_last)); + //DPI scaling + MUtils::GUI::scale_widget(this); + //Freeze minimum size setMinimumSize(size()); ui->splitter->setSizes(QList() << 16 << 196); diff --git a/src/win_updater.cpp b/src/win_updater.cpp index 70f4d36..5b23e17 100644 --- a/src/win_updater.cpp +++ b/src/win_updater.cpp @@ -108,7 +108,8 @@ UpdaterDialog::UpdaterDialog(QWidget *parent, const SysinfoModel *sysinfo, const ui->setupUi(this); setWindowFlags(windowFlags() & (~Qt::WindowContextHelpButtonHint)); - //Fix size + //Scale and fix size + MUtils::GUI::scale_widget(this); setFixedSize(size()); //Enable buttons