SteamAutoCracker icon indicating copy to clipboard operation
SteamAutoCracker copied to clipboard

HiDPI support

Open n3thshan opened this issue 6 months ago • 3 comments

On hidpi screens, the text is too blurry and low res. Doesnt matter to many but is a nice QoL feature to have especially if it is easy to be implemented!

n3thshan avatar Jul 01 '25 04:07 n3thshan

You can just add this after the imports should fix it.

try:
    ctypes.windll.shcore.SetProcessDpiAwareness(2)
except AttributeError:
    ctypes.windll.user32.SetProcessDPIAware(True)

7gxycn08 avatar Aug 16 '25 07:08 7gxycn08

@7gxycn08 thanks! I guess import ctypes is also needed.

I did not try this and don't know that module at all. I'm sadly unable to replicate. If anyone could confirm this

BigBoiCJ avatar Aug 21 '25 21:08 BigBoiCJ

@BigBoiCJ Yes import ctypes obviously should come first. Got a screenshot of both with the ctypes fix and without so you can see the issue clearly.

Normally tkinter is not dpi aware that's why there is a blur effect on text In the GUI. With ctypes you can set the application to be dpi aware which causes the GUI to be crisp.

Here are some screenshots:

Without ctypes fix:
Image
With ctypes fix:
Image

To replicate the issue you can set windows scale to something greater than 100% something like 225% or 300%.

7gxycn08 avatar Aug 21 '25 22:08 7gxycn08