View Issue Details

IDProjectCategoryView StatusLast Update
0038867LazarusLCLpublic2021-05-09 09:50
ReporterJohn Raycheba Assigned ToBart Broersma  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
OSWindows 
Product Version2.0.12 
Summary0038867: Promptdialog Layout incorrect when font size different from that of the system font.
Description(Tested on Win 7 & 10 x64 with Lazarus x32 v2.04, v2.0.8 and v2.0.12).

Lazarus 2.0.12 and earlier do not properly caclulate the layout with fonts other than the system font.

Use attached program LT07.lpi to test.
Steps To ReproduceTo reproduce / test the issue:
1. Compile and run the program LT07.
2. Click one of the "btn???" and inspect the result.
3. Close the prompt dialog.
3. Select a different font size, say 12, 24, 36 and 48.
4. Repeat.


Included with this project is the file "C:\lazarus\LCL\includes\promptdialog.inc".
This file is not part of the project and contains a number of changes, all of which are marked with the comment "//JR:".
Only the changes in the "TPrompdialog" have been made.
It's likely that the "TQuestiondialog" and the "small screen dialog" relquire similar changes.

To test the suggested "fix":
1. Backup and replace the original "C:\lazarus\LCL\includes\promptdialog.inc" with the one included with this program.
2. Recompile Lazarus.
3. Recompile the LTO7 program.
3. Repeat the "To reproduce / test the issue:" steps.
Additional InformationA modified copy of the file "promptdialog.inc" in the zip file corrects the problem.
TagsNo tags attached.
Fixed in Revision
LazTarget-
WidgetsetWin32/Win64
Attached Files

Activities

John Raycheba

2021-05-09 02:11

reporter  

LT07.zip (12,571 bytes)

Bart Broersma

2021-05-09 08:08

developer   ~0130803

Can you test with trunk?

Bart Broersma

2021-05-09 09:50

developer   ~0130805

The CreateMessageDialog function is simply not designed for what you are trying to do with it.
In Delphi (7) you get exactly the same mess as in Lazarus.

Since you call CreateMessageDialog you already have access to the form and if you really need to change the font of that, you can also manually adjust the size and layout as needed.

Issue History

Date Modified Username Field Change
2021-05-09 02:11 John Raycheba New Issue
2021-05-09 02:11 John Raycheba File Added: LT07.zip
2021-05-09 08:08 Bart Broersma Note Added: 0130803
2021-05-09 09:50 Bart Broersma Assigned To => Bart Broersma
2021-05-09 09:50 Bart Broersma Status new => resolved
2021-05-09 09:50 Bart Broersma Resolution open => no change required
2021-05-09 09:50 Bart Broersma LazTarget => -
2021-05-09 09:50 Bart Broersma Widgetset Win32/Win64 => Win32/Win64
2021-05-09 09:50 Bart Broersma Note Added: 0130805