fix: Icons not being scaled correctly anymore

This commit is contained in:
WerWolv 2024-03-22 17:52:00 +01:00
parent 9b9f7e2a1d
commit ac8ec2b622
1 changed files with 7 additions and 1 deletions

View File

@ -278,7 +278,13 @@ namespace hex::plugin::builtin {
// Disable merge mode for this font but retain the rest of the configuration
cfg.MergeMode = false;
cfg.SizePixels = font.defaultSize.value_or(fontSize);
auto size = fontSize;
if (font.defaultSize.has_value())
size = font.defaultSize.value() * ImHexApi::System::getGlobalScale();
cfg.SizePixels = size;
ON_SCOPE_EXIT { cfg.MergeMode = true; };
// Construct a range that only contains the first glyph of the font