Skip to content

Commit 082f85a

Browse files
bonzibuddge0rdi
authored andcommitted
Scale menu icons up to 250% (240 DPI)
This should allow for icons in the menu to scale better for higher DPI displays. Configurations above 250% will retain the sizes for 240DPI.
1 parent 0ce76c9 commit 082f85a

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

Src/StartMenu/StartMenuDLL/SettingsUI.cpp

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4659,11 +4659,19 @@ void UpdateSettings( void )
46594659
else if (dpi<96) dpi=96;
46604660
else if (dpi>480) dpi=480;
46614661

4662-
int iconSize=24;
4663-
if (dpi<=96)
4664-
iconSize=16;
4665-
else if (dpi<=120)
4666-
iconSize=20;
4662+
int iconSize=16;
4663+
if (dpi>=240)
4664+
iconSize=40; // for 250% scaling
4665+
else if (dpi>=216)
4666+
iconSize=36; // for 225% scaling
4667+
else if (dpi>=192)
4668+
iconSize=32; // for 200% scaling
4669+
else if (dpi>=168)
4670+
iconSize=28; // for 175% scaling
4671+
else if (dpi>=144)
4672+
iconSize=24; // for 150% scaling
4673+
else if (dpi>=120)
4674+
iconSize=20; // for 125% scaling
46674675
UpdateSetting(L"SmallIconSize",CComVariant(iconSize),false);
46684676
UpdateSetting(L"LargeIconSize",CComVariant(iconSize*2),false);
46694677

0 commit comments

Comments
 (0)