Revert "lcl: label: align to right for autosize and taRightJustify (Delphi compatibility)"

This reverts commit 29996ddc03.
This commit is contained in:
Ondrej Pokorny 2022-11-30 10:15:22 +01:00
parent f1b3d0ca11
commit 2a1ea2ca04

View File

@ -300,18 +300,11 @@ begin
end;
procedure TCustomLabel.UpdateSize;
var
OldWidth, OldLeft: Integer;
begin
OldWidth := Width;
OldLeft := Left;
InvalidatePreferredSize;
if OptimalFill and (not AutoSize) then
AdjustFontForOptimalFill;
AdjustSize;
if (AutoSize or OptimalFill) and (Alignment=taRightJustify)
and (OldWidth<>Width) and (OldLeft=Left) then
Left := Left-Width+OldWidth;
end;
{-------------------------------------------------------------------------------