Skip to content

Commit

Permalink
fix: Icons not being scaled correctly anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
WerWolv committed Mar 22, 2024
1 parent 9df21c7 commit 2b1be7b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plugins/builtin/source/content/init_tasks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2b1be7b

Please sign in to comment.