Page 1 of 1

UI layout not optimized for size 10 fonts

Posted: 2019-03-13, 12:49 UTC
by mpavelka
Hi,

On Windows XP the standard desktop font was Microsoft Sans Serif, 9. On Windows 7 and 10 it is Segoe UI, 9.
As time goes, people are using bigger monitors, 22-24" is nowadays a standard. With bigger monitors the font is often enlarged from 9 to 10, leaving DPI on 96. E.g. the standard setup in our company (300+ people) is 24" monitor, 1920x1200, 96 DPI, Windows 7/10 configured with Segoe UI, 10 font.

When I configure dialog box font in TC to Segoe UI, 10, many dialogs look broken - controls overlapping, misaligned etc.
https://www.dropbox.com/s/zls18ndb2sep7p5/screenshot1.png?dl=0
https://www.dropbox.com/s/8q8oal6f4ae4ssy/screenshot2.png?dl=0
https://www.dropbox.com/s/l1xzgaz4gd6rbge/screenshot3.png?dl=0
https://www.dropbox.com/s/qm8vus5k71xr0g7/screenshot4.png?dl=0

Being a UI developer myself, I understand it is difficult to optimize application layout for every possible font. But again - I believe size 10 fonts are becoming more common nowadays on 22"+ monitors. The misalignment is often subtle - couple of pixels. You would make a lot of customers happy by correcting UI controls placement for size 10 fonts.

thanks, Michal

Re: UI layout not optimized for size 10 fonts

Posted: 2019-03-13, 20:46 UTC
by HolgerK
You can increase the dialog box using OverrideDPI.
Configuration->Options->Fonts
Dialog box scaling(does not scale the main window):
[x] Set dots per Inch (DPI) to: [107] (10/9*96)

Important: set the "dialog box font" to "Segoe UI,9" (the font will be scaled by the same amount as the dialog box)

Regards
Holger

Re: UI layout not optimized for size 10 fonts

Posted: 2019-03-14, 10:43 UTC
by ghisler(Author)
Indeed the dialog boxes are NOT scaled with fonts! This is intentional. Please use size 8 or 9 (depending on the used font, some are too small in 8, some too large in 9) and then scaling as HolgerK suggested.

Re: UI layout not optimized for size 10 fonts

Posted: 2019-03-14, 16:14 UTC
by mpavelka
The trick with DPI 107 worked. There are still some imperfections, but overall the look is better.
thanks a lot, Michal

Re: UI layout not optimized for size 10 fonts

Posted: 2019-03-18, 16:59 UTC
by mpavelka
One more thing - I noticed the background transfer dialog does not scale with DPI like the rest of dialogs.
It's possibly a bug.

https://www.dropbox.com/s/zqwv3y2o0yaoqg5/scaled.png?dl=0
https://www.dropbox.com/s/h8bshvqvl6tp6xb/notscaled.png?dl=0

Michal

Re: UI layout not optimized for size 10 fonts

Posted: 2019-03-19, 10:25 UTC
by ghisler(Author)
It's a Windows API dialog, not Delphi/Lazarus dialog, because it's invoked from a background threads. Delphi/Lazarus dialogs are not thread safe. System dialogs are unfortunately not scalable, they are scaled by the current Windows DPI settings.