Promptdialog Layout incorrect when font size different from that of the system font.
Original Reporter info from Mantis: mtrsoft
-
Reporter name: John Raycheba
Original Reporter info from Mantis: mtrsoft
- Reporter name: John Raycheba
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 reproduce:
To reproduce / test the issue:
- Compile and run the program LT07.
- Click one of the "btn???" and inspect the result.
- Close the prompt dialog.
- Select a different font size, say 12, 24, 36 and 48.
- 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":
- Backup and replace the original "C:\lazarus\LCL\includes\promptdialog.inc" with the one included with this program.
- Recompile Lazarus.
- Recompile the LTO7 program.
- Repeat the "To reproduce / test the issue:" steps.
Additional information:
A modified copy of the file "promptdialog.inc" in the zip file corrects the problem.
Mantis conversion info:
- Mantis ID: 38867
- OS: Windows
- Build: 2.0.4 to 2.0.12
- Version: 2.0.12