fix: Font being scaled too large if main screen DPI is higher than secondary screen DPIs

#2419
This commit is contained in:
WerWolv
2025-08-24 12:57:56 +02:00
parent e385487a6b
commit fcda856198
2 changed files with 7 additions and 4 deletions

View File

@@ -16,6 +16,7 @@
#include <nlohmann/json.hpp>
#include <string>
#include <hex/api/events/events_lifecycle.hpp>
namespace hex::fonts { bool setupFonts(); }
@@ -108,8 +109,10 @@ namespace hex::plugin::builtin {
ImHexApi::System::impl::setGlobalScale(interfaceScaling);
});
const auto nativeScale = ImHexApi::System::getNativeScale();
EventDPIChanged::post(nativeScale, nativeScale);
EventImHexStartupFinished::subscribe([] {
const auto nativeScale = ImHexApi::System::getNativeScale();
EventDPIChanged::post(nativeScale, nativeScale);
});
return true;
}