HiDPI Scaling - AutoAdjustLayout(?) Side Effect - ParentFont set to False
Original Reporter info from Mantis: mtrsoft
-
Reporter name: John Raycheba
Original Reporter info from Mantis: mtrsoft
- Reporter name: John Raycheba
Description:
Systems:
System 1.
Lazarus 2.0.2 /32bit.
OS: Windows 7 /64 on a laptop.
External Monitor: Resolution setting 100% (96 PPI).
Used to develop and test the app at 96 PPI.
System 2.
OS: Windows 7 /32 on a laptop.
Internal Monitor: Resolution setting 150% (144PPI).
Used to test the compiled app at 144 PPI.
System 3.
OS: Windows 10 /32 on a laptop
Monitors:
Internal Resolution setting 100% (96 PPI).
External Resolution setting 150$ (144 PPI).
Configured as extended (so running app can be moved from one monitor to the other)
Used to test the compiled and running app at both 96 and 144 PPI.
Main app characteristics:
- A page control on the main form with its ParentFont set to True.
- Two tabsheets with their ParentFont set to True.
- Various buttons and labels on the tabsheets all of which have their ParentFont set to True
THE TESTS using the attached demo app LT06:
-
On System 1.
The App behaves as expected; that is.
(a) The ParentFont setting for the pagecontrol, tabsheets, buttons and labels are all set to True.
(b) Changing the main form's font (to, e.g. Bold Italic) results on the font for the tabsheets, buttons and labels changing. -
On System 2:
The App does NOT behave as expected.
(a) The various controls seem to be properly scaled; i.e., are larger.
(b) It appears that the Main Menu HAS been properly scaled.
(c) The ParentFont setting for pagecontrol, tabsheets, buttons and labels are all set to False.
(d) Changing the main form's font does NOT result in a font change for the other controls.
(e) Resetting the ParentFont to True for all of the controls makes it possible for the font on the various controls to change. -
On System 3:
(a) When the App is started on the main 96 PPI monitor the app behaves properly; that is, the same as on system 1.
(b) When the running App is dragged the the "extended" (144 PPI) monitor the App behaves as on System 2, BUT now the main menu is not properly scaled.
The primary purpose of this report is to draw your attention the ParentFont setting side effect that occurs when an app is scaled.
Attached is the souce code (and project) for the app, LT06, in the zipped file named LT06.7z, used above to illustate the ParentFont issue.
Steps to reproduce:
Download, compile and run the attachment.
Use the Description as a guide.
Mantis conversion info:
- Mantis ID: 35560
- OS: Windows 7 / 10
- OS Build: 7 / 10
- Platform: Windows
- Version: 2.0.2