diff --git a/docs/Contributors.txt b/docs/Contributors.txt index 09d0b44172..36fe5c535c 100644 --- a/docs/Contributors.txt +++ b/docs/Contributors.txt @@ -24,6 +24,7 @@ Evgen A. Palamarchuck Felipe Monteiro de Carvalho Florian Koeberle Francisco Manuel +Giuliano Colla GongYu Hans-Joachim Ott Hwang Weng Sun diff --git a/lcl/include/control.inc b/lcl/include/control.inc index 7fb5d1d0cb..9846017f8a 100644 --- a/lcl/include/control.inc +++ b/lcl/include/control.inc @@ -2513,9 +2513,10 @@ begin FAlign := Value; // if anchors were on default then change them to new default // This is done for Delphi compatibility. - if Anchors=AnchorAlign[OldAlign] then - Anchors:=AnchorAlign[FAlign]; - RequestAlign; + if (Anchors=AnchorAlign[OldAlign]) and (Anchors<>AnchorAlign[FAlign]) then + Anchors:=AnchorAlign[FAlign] + else + RequestAlign; end; {------------------------------------------------------------------------------ diff --git a/lcl/include/wincontrol.inc b/lcl/include/wincontrol.inc index 2d36c8332a..1f76a3b13b 100644 --- a/lcl/include/wincontrol.inc +++ b/lcl/include/wincontrol.inc @@ -1507,9 +1507,12 @@ var Result := False; case AAlign of alTop: Result := Control1.Top < Control2.Top; + alLeft: Result := Control1.Left < Control2.Left; + // contrary to VCL, we use > for alBottom, alRight + // Maybe it is a bug in the VCL. + // This results in first control is put rightmost/bottommost alBottom: Result := (Control1.Top + Control1.Height) > (Control2.Top + Control2.Height); - alLeft: Result := Control1.Left < Control2.Left; alRight: Result := (Control1.Left + Control1.Width) > (Control2.Left + Control2.Width); end;