Hello wp, I have very good news. I tested your changes carefully and everything works perfectly:
I made all the following tests on Linux (Ubuntu 18.04) and Win7 and (an older) Win10 with Lazarus 2.0.10 / FPC 3.2.0:
- default width of the dialog is 480 (with a longer text)
- increasing in steps up to 2500 => works
- decreasing in steps down to 120 => works
- a width of 1..119 results in 120
- a width <= 0 results in the default width (480)
That was exactly what I expected from the if-statement, which I replaced in the sources.
But in Windows there is an issue that the width is specified in "dialog units". It seems that I have to divide the Width property value by 2 before passing it to the TaskDialogIndirect windows function, but I am not sure whether this is correct all the time.
I did *not* see this effect on my Win7 and Win10. The resulting width was always 1:1 the same as what I had set. But I don't have High-DPI-settings on my Windows.
The only thing which still could improved is that in the Objectinspector the new property 'Width' has no remark. Maybe you want something to set like "can set the Width of the Dialog (Minimum=120, 0=Automatic=Default)".
To rebuild the IDE worked with menu Tools / "Build Lazarus with Profile: Normal IDE" on Windows and Linux.
Thank you again very much for improving this dialog and your continuous help.