From c4cbcc72322368e815363c7d560aa18ba6d7aa97 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 17 Jan 2022 20:20:37 +0100 Subject: [PATCH] ui: Fix horrible scaling on MacOS --- main/source/init/splash_window.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main/source/init/splash_window.cpp b/main/source/init/splash_window.cpp index e0040fbf7..bd16ea99b 100644 --- a/main/source/init/splash_window.cpp +++ b/main/source/init/splash_window.cpp @@ -171,6 +171,13 @@ namespace hex::init { SharedData::globalScale = SharedData::fontScale = std::midpoint(xScale, yScale); + // On Macs with a retina display (basically all modern ones we care about), the OS reports twice + // the actual monitor scale for some obscure reason. Get rid of this here so ImHex doesn't look + // extremely huge with native scaling on MacOS. + #if defined(OS_MACOS) + SharedData::globalScale /= 2; + #endif + if (SharedData::globalScale <= 0) { SharedData::globalScale = 1.0; }