OoliteProject / oolite

The main Oolite repository.
https://www.oolite.space
543 stars 70 forks source link

Formating of help popup window on Windows has issues #483

Closed phkb closed 1 month ago

phkb commented 1 month ago

On Windows 11 (23H2) image.png

brianread108 commented 1 month ago

and on Linux (Mint21) Screenshot from 2024-05-25 06-33-47

AnotherCommander commented 1 month ago

@phkb What desktop resolution and DPI scaling are you running? If you remove one \t from each line of text in main.m, does this fix it for you? I can confirm that if I do this, it still can display fine on my system and should, theoretically, fix your formatting too.

@brianread108 The Windows message box fonts are typcially variable-width, while the Linux console fonts are typically monospaced. As mentioned in the pull request for this feature, text formatting was optimized for the Windows message box (and apparently, I still failed on that!). Sort of having two different blocks of pretty much the same help text (one for each OS, not too fond of the idea) plus or minus a few tab characters, the Linux text formatting is expected to be slightly different.

AnotherCommander commented 1 month ago

It looks like this for me with one tab less on each line. I am on Windows 11 23H2 (10.0.22631.3593) , 1920x1080, 125% scaling:

WindowsHelpWindow01

@phkb I believe it should lpok the same for you too,

phkb commented 1 month ago

Mine was at 100% scaling. Just recompiling with the tweak now.

phkb commented 1 month ago

OK, after removing a "\t" from every line, I get this: image.png

AnotherCommander commented 1 month ago

OK, so the culrpit is indeed DPI scaling. Looking into it now, but chances are that we may have to adjust the text for 100% and live with it for the rest of the scaling options.

AnotherCommander commented 1 month ago

@phkb Please test commit 0b5b52b. On my system it works correctly with all available Windows scaling factors.

phkb commented 1 month ago

Looking excellent at 100% scaling: image.png

phkb commented 1 month ago

I think this is resolved now.

brianread108 commented 1 month ago

Linux - Better: Screenshot from 2024-05-26 20-02-01