Dizzy611 / DancingMadFF6

An MSU-1 modification for Final Fantasy 6
Other
25 stars 1 forks source link

Installer issue: Installer appears strange/broken on high DPI systems. #87

Closed Dizzy611 closed 2 years ago

Dizzy611 commented 6 years ago

High DPI systems (such as e.g. my current laptop with its small-ish screen at 1080p) will display the installer in a strange way that partially breaks certain elements and hides others.

Forcing python to run with high dpi settings set to "scaling performed by system" fixes the breakage but causes the text to be blurry, and is probably not something that can be set as part of the self-extracting installer.

A better option would be, if possible, to have the program tell if the display is high DPI and reduce text sizes etc to maintain the correct UI positioning.

There's probably a smart way to do this but with my minimal experience with QT I'm not sure how. QT is clearly trying to do the scaling itself (and is signifying to Windows it's capable of doing so, thus why forcing scaling to 'system' works and fixes the problem), but its failing, probably due to hard-coded pixel-based sizes for many elements (said hardcoding was created by QT's designer in the first place...)

This is unlikely to be an issue for most users (indeed, if it was, I would have gotten reports before now because notably the Accept button for the license page ends up offscreen), but it should be fixed eventually at the least.

If there's some way to force system scaling for now, in a way that would work in the self extracting installer, that would also work.

Dizzy611 commented 6 years ago

So, a workaround, which I may advise people do for now since all my other attempts seem to be failing so far and fixing the issue will require redesigning the wizard, is to set the compatibility options for the self-extracting executable (ie DancingMadInstaller.exe) to scaling by system, as this will carry over to anything launched by it.

Dizzy611 commented 6 years ago

Given I'm already a couple months late on this release, I think we can delay a complete rewrite of the UI to use scalable widgets for HF4. That's going to be quite the undertaking. For now the listed workaround works.

Dizzy611 commented 6 years ago

Partial fix to this (in the form of reducing the size of and repositioning certain elements) in commit b5b31ad1a679310e1d70ce11cc1707db3adbbcde

Dizzy611 commented 6 years ago

So the biggest problem I have with this is that the easiest way to make GUIs like this is in a wysiwyg system, something like Qt Designer, which is what I've been doing, but despite the fact the Qt devs themselves say you need to be using relative sizes these days, there's not an easy way to do so in their dialogs. And I'm no good at procedurally creating decent looking forms.

Honestly, I may be tempted at some point to create a version of the installer with C# or VB.Net instead, using native windows forms, as a drastic solution to issues like these as my understanding is recent versions of the APIs scale well on their own with nothing special needed.

The very basics of what the installer does and how to accomplish it will not have changed, which means moving to another language would not be incredibly difficult, the only worry I have being the ROM-header-reading and IPS-handling frameworks I relied on in Python to automate that part of the process.

Dizzy611 commented 2 years ago

Having tested this on a few high DPI systems recently for the moment I think this is as good as it's going to get.