kliment / Printrun

Pronterface, Pronsole, and Printcore - Pure Python 3d printing host software
GNU General Public License v3.0
2.35k stars 995 forks source link

Pronterface for Windows has no HighDPI awareness #1364

Open neofelis2X opened 1 year ago

neofelis2X commented 1 year ago

Nothing urgent, but something I noticed on my laptop. High DPI awareness is not enabled on Windows for Pronterface. As a result, fonts and certain UI elements appear pixelated / blurred when the user sets the OS to custom scaling.

Edit: The image shows the difference. The application in the background (Total Commander) has clear fonts and Pronterface is pixelated. The title bar is clear in both, as it is generated directly by Windows. 230719_pront_resolution

It is quite easy to enable dpi awareness. For example by adding: from ctypes import windll windll.shcore.SetProcessDpiAwareness(True)

BUT the real problem is that quite a few dialogs, frames and widgets have their size hardcoded in pixels. It will be a bit of work to find them all, convert them(.FromDIP() etc.) and test everything.

This is not an issue on MacOS, everything looks fine here. Are there any Linux distros that suffer from similar problems?

rockstorm101 commented 12 months ago

Are there any Linux distros that suffer from similar problems?

I'm unsure about how to confirm whether I see the issue or not but I'm happy to try. What did you do on macOS to prove it is not affected? See if I can replicate it

neofelis2X commented 12 months ago

I have included a picture showing the problem on Windows. Simply put, if you don't see this effect and the fonts are sharp, then your system is not affected.

Also, this is the second reason why I know that macOS is not affected: »Some systems like eg Apple’s OSes automatically scale all the coordinates by the DPI scaling factor, however not all systems supported by wxWidgets do it – notably, MSW does not.« wxPython Doc