View Issue Details

IDProjectCategoryView StatusLast Update
0035560LazarusLCLpublic2019-05-13 11:45
ReporterJohn RaychebaAssigned To 
Status newResolutionopen 
PlatformWindowsOSWindows 7 / 10 OS Version7 / 10
Product Version2.0.2Product Build 
Target VersionFixed in Version 
Summary0035560: HiDPI Scaling - AutoAdjustLayout(?) Side Effect - ParentFont set to False

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
  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:

1. A page control on the main form with its ParentFont set to True.
2. Two tabsheets with their ParentFont set to True.
3. Various buttons and labels on the tabsheets all of which have their ParentFont set to True

THE TESTS using the attached demo app LT06:

1. 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.

2. 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.

3. 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 ReproduceDownload, compile and run the attachment.
Use the Description as a guide.
TagsNo tags attached.
Fixed in Revision
Attached Files


John Raycheba

2019-05-11 07:00


LT06.7z (92,889 bytes)

John Raycheba

2019-05-11 07:06

reporter   ~0116124

There is a typo in the Test 0000002 on System 2;
The last word in the line (c) The ParentFont setting ... True SHOULD BE FALSE.

Juha Manninen

2019-05-13 11:45

developer   ~0116156

I fixed the line.
I don't know why a reporter cannot modify his own Description field.

Issue History

Date Modified Username Field Change
2019-05-11 07:00 John Raycheba New Issue
2019-05-11 07:00 John Raycheba File Added: LT06.7z
2019-05-11 07:06 John Raycheba Note Added: 0116124
2019-05-13 11:44 Juha Manninen Description Updated View Revisions
2019-05-13 11:44 Juha Manninen LazTarget => -
2019-05-13 11:44 Juha Manninen Widgetset Win32/Win64 => Win32/Win64
2019-05-13 11:45 Juha Manninen Note Added: 0116156