Forum > LCL

[resolved] current Lazarus master changes existing form layout

(1/3) > >>

Muso:
I used FPCupDeluxe to install today's Lazarus master:
Lazarus 2.3.0 (rev main-2_3-1741-gbcf97404fa) FPC 3.2.2 x86_64-win64-win32/win64

I did nothing else than top open an existing project with FPCupDeluxe and after pressing save I get tons of these changes:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---diff --git a/JTDriverSensingMain.lfm b/JTDriverSensingMain.lfmindex 1e37176..f3df82e 100644--- a/JTDriverSensingMain.lfm+++ b/JTDriverSensingMain.lfm@@ -15,7 +15,7 @@ object MainForm: TMainForm   OnDropFiles = FormDropFiles   OnShow = FormShow   Position = poDesktopCenter-  LCLVersion = '2.2.2.0'+  LCLVersion = '2.3.0.0'   object MainPC: TPageControl     Left = 4     Height = 676@@ -52,6 +52,7 @@ object MainForm: TMainForm           EditLabel.Height = 15           EditLabel.Width = 108           EditLabel.Caption = 'Actual Signal [mM]'+          EditLabel.Color = clDefault           EditLabel.ParentColor = False           Enabled = False           TabOrder = 0@@ -61,7 +62,7 @@ object MainForm: TMainForm           Height = 19           Hint = 'Displayed in chart'           Top = 0-          Width = 36+          Width = 34           Caption = 'On'I get for _every_ element now
EditLabel.Color = clDefault
added.
This seems unnecessary since the idea is that when something is he default, it is not written to the .lfm file.

The more severe this is that I get form many element a change in the width. I have my reasons why I set certain width values and Lazarus cannot just change them without even informing me that this is done and why.

wp:
The clDefault issue probably is related to https://wiki.freepascal.org/Lazarus_2.4.0_release_notes#TLabel.Transparent.2C_.Color_and_.ParentColor_changes.

Another related consequence of this bug fix is that labels read from v2.2.2-lfm files now have their ParentColor set to false. Reset this to true, and the Color line will be removed from the lfm after saving (because the Parent has color clDefault, too).

I don't see any size change in the test that I did before writing this post. In your diff a PageControl is mentioned. IIRC there is/was an issue with autosizing related to PageControls. I'd speculate that the width changes that you see are due to it.

Be guaranteed: Nobody makes changes in published properties just for fun. 100% backward compatibility cannot be assured, and in fact every fixed bug breaks backward compatibility.

Muso:

--- Quote from: wp on July 27, 2022, 11:14:41 pm ---Another related consequence of this bug fix is that labels read from v2.2.2-lfm files now have their ParentColor set to false. Reset this to true, and the Color line will be removed from the lfm after saving (because the Parent has color clDefault, too).
--- End quote ---

How can I do this? My .lfm file is huge, see attached. Is there a preferences option available or do I have to use a text editor on the .lfm file?


--- Quote from: wp on July 27, 2022, 11:14:41 pm ---I don't see any size change in the test that I did before writing this post. In your diff a PageControl is mentioned. IIRC there is/was an issue with autosizing related to PageControls. I'd speculate that the width changes that you see are due to it.

--- End quote ---

Maybe my .lfm file is then a good test. I attached it.


--- Quote from: wp on July 27, 2022, 11:14:41 pm ---Be guaranteed: Nobody makes changes in published properties just for fun. 100% backward compatibility cannot be assured, and in fact every fixed bug breaks backward compatibility.

--- End quote ---

Sure and I did not accuse anyone. i just reported an issue I noticed.

wp:

--- Quote from: Muso on July 27, 2022, 11:48:59 pm ---
--- Quote from: wp on July 27, 2022, 11:14:41 pm ---Another related consequence of this bug fix is that labels read from v2.2.2-lfm files now have their ParentColor set to false. Reset this to true, and the Color line will be removed from the lfm after saving (because the Parent has color clDefault, too).
--- End quote ---

How can I do this? My .lfm file is huge, see attached. Is there a preferences option available or do I have to use a text editor on the .lfm file?

--- End quote ---
Why not "Search & Replace" in an external editor? You cannot damage anything provided that you have a backup copy of the changed lfm file.


--- Quote from: Muso on July 27, 2022, 11:48:59 pm ---
--- Quote from: wp on July 27, 2022, 11:14:41 pm ---I don't see any size change in the test that I did before writing this post. In your diff a PageControl is mentioned. IIRC there is/was an issue with autosizing related to PageControls. I'd speculate that the width changes that you see are due to it.

--- End quote ---

Maybe my .lfm file is then a good test. I attached it.
--- End quote ---
You provided only the lfm file which is read by the IDE only as text. Please add the correspondig pas file, too.

Muso:

--- Quote from: wp on July 28, 2022, 01:08:39 pm ---
--- Quote from: Muso on July 27, 2022, 11:48:59 pm ---How can I do this? My .lfm file is huge, see attached. Is there a preferences option available or do I have to use a text editor on the .lfm file?

--- End quote ---
Why not "Search & Replace" in an external editor? You cannot damage anything provided that you have a backup copy of the changed lfm file.
--- End quote ---
That was my question. So I have to use a text editor.

However, I think it is better when Lazarus' reader would remove existing
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---ParentColor = Falseinstead of keeping them and add on top
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Color = clDefault

--- Quote from: wp on July 28, 2022, 01:08:39 pm ---
--- Quote from: Muso on July 27, 2022, 11:48:59 pm ---Maybe my .lfm file is then a good test. I attached it.
--- End quote ---
You provided only the lfm file which is read by the IDE only as text. Please add the corresponding pas file, too.

--- End quote ---
I attached this now.

Navigation

[0] Message Index

[#] Next page

Go to full version