Skip to content

Commit

Permalink
Properly scale default skin font according to DPI (#1110)
Browse files Browse the repository at this point in the history
If skin doesn't specify font to be used (such as `Classic Skin`) we will
use default system font (used for menus).

But we didn't scale the font size according to DPI.
This commit will fix that.

Fixes #1110
  • Loading branch information
ge0rdi committed Jan 13, 2023
1 parent 615fe66 commit 528d15e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Src/StartMenu/StartMenuDLL/SkinManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ HFONT MenuSkin::LoadSkinFont( const wchar_t *str, const wchar_t *name, int weigh
NONCLIENTMETRICS metrics={sizeof(metrics)};
SystemParametersInfo(SPI_GETNONCLIENTMETRICS,NULL,&metrics,0);
metrics.lfMenuFont.lfQuality=(BYTE)quality;
metrics.lfMenuFont.lfHeight=ScaleSkinElement(metrics.lfMenuFont.lfHeight,scale);
return CreateFontIndirect(&metrics.lfMenuFont);
}
size=ScaleSkinElement((int)(size*96),scale)/72.f;
Expand Down

0 comments on commit 528d15e

Please sign in to comment.