Recent

Author Topic: Lazarus seems to be making some random changes to the positioning of form items?  (Read 727 times)

vfclists

  • Hero Member
  • *****
  • Posts: 1157
    • HowTos Considered Harmful?
I have this problem where after viewing a form in the IDE without making changes to it, the position of so many objects would have shifted slightly without any obvious cause.

Normally I expect the just the Top and Left properties of the form to change, and just one or two items  I have accidentally dragged.

It is very obvious when git notes the .lfm file as having been changed and dozens of objects have been shifted by a few pixels.

I'm using Lazarus 3.0 on KDE 5 Plasma desktop if it is any relevance and program's widget set is Qt5. I think something about the desktop system forces items to be realigned for some unknown reason, or something in the IDE settings in relation to the desktop setting triggers the alignment.

Lazarus 3.0/FPC 3.2.2

n7800

  • Hero Member
  • *****
  • Posts: 600
  • Lazarus IDE contributor
    • GitLab profile
Yes, I see this all the time. As far as I know, it happens when opening projects in different widget sets or even different OS themes. Usually, when opening projects on the same system (and configuration), there are no changes.

As a Git user, I also often see property reordering changes (LFM lines retain their value, but change their order). This happens when opening a project in a different version of Lazarus. There are reasons why developers reorder properties in the source code, and LFM files follow suit.

Nicole

  • Hero Member
  • *****
  • Posts: 1303
Dou you use settings as "alClient"?
If yes, try if the problem persists on alNone.

No, this is no solution. You use alClient because you want it.
It is just a searching for connected reasons.

I could "fix"  some layout problems by this change.
However, it is not the layout I want any more.

Boleeman

  • Hero Member
  • *****
  • Posts: 1107
When running a program on different computers I uncheck use LCL scaling in Project options as a quick temporary fix.

For permanent positioning I make use of OnResize event to force postioning/sizing of some controls (like TPaintbox even though I use alClient).

 

TinyPortal © 2005-2018