mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-28 13:57:22 +00:00
GUI: Windows: use pass through high DPI scaling factor rounding policy
Means fractional scaling factors such as Windows' 175% will no longer use 200% (integer rounding) etc. This is the default on Qt 6 anyway. Implements #3043.
This commit is contained in:
parent
76d0b61287
commit
ade0368f10
5
NEWS.md
5
NEWS.md
@ -4,6 +4,11 @@
|
||||
|
||||
* mkvmerge: AC-3 parser: E-AC-3 with BSID values > 10 and ≤ 15 are recognized
|
||||
now, too. Implements #3211.
|
||||
* MKVToolNix GUI: only on Windows: when compiled with Qt ≥ 5.14 and < 6 (which
|
||||
is the case for the officially provided binaries) fractional screen scaling
|
||||
will be enabled. This means that the GUI will be scaled appropriately if
|
||||
Windows is set to 125%, 150% or 175% instead of being too small or too
|
||||
large. Implements #3043.
|
||||
|
||||
## Bug fixes
|
||||
|
||||
|
@ -30,8 +30,14 @@ enableOrDisableHighDPIScaling() {
|
||||
auto reg = Util::Settings::registry();
|
||||
reg->beginGroup(s_grpSettings);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||
if (!reg->value(s_valUiDisableHighDPIScaling).toBool())
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
if (reg->value(s_valUiDisableHighDPIScaling).toBool())
|
||||
return;
|
||||
|
||||
QApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true);
|
||||
QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true);
|
||||
# if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -133,7 +133,7 @@ void
|
||||
gatherEnvironmentVariables(QStringList &info) {
|
||||
info << Q("") << Q("## Environment variables") << Q("");
|
||||
|
||||
auto keys = QStringList{} << Q("QT_AUTO_SCREEN_SCALE_FACTOR") << Q("QT_SCALE_FACTOR") << Q("QT_SCREEN_SCALE_FACTORS") << Q("QT_DEVICE_PIXEL_RATIO")
|
||||
auto keys = QStringList{} << Q("QT_AUTO_SCREEN_SCALE_FACTOR") << Q("QT_SCALE_FACTOR") << Q("QT_SCREEN_SCALE_FACTORS") << Q("QT_DEVICE_PIXEL_RATIO") << Q("QT_SCALE_FACTOR_ROUNDING_POLICY")
|
||||
<< Q("MTX_LOGGER") << Q("MTX_DEBUG") << Q("MKVTOOLNIX_DEBUG") << Q("MKVMERGE_DEBUG")
|
||||
<< Q("LC_ALL") << Q("LC_MESSAGES") << Q("LC_CTYPE") << Q("LANG") << Q("LANGUAGE");
|
||||
keys.sort();
|
||||
|
Loading…
Reference in New Issue
Block a user