mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 19:09:19 +02:00
LCL, CoolBar: Revert FControl.Align back to alNone. Set control width also when autosizing.
git-svn-id: trunk@40497 -
This commit is contained in:
parent
a337e0c6f4
commit
b7b1d42401
@ -169,7 +169,6 @@ end;
|
|||||||
procedure TCoolBand.SetControlWidth;
|
procedure TCoolBand.SetControlWidth;
|
||||||
begin
|
begin
|
||||||
if FControl is TCustomCheckBox then Exit;
|
if FControl is TCustomCheckBox then Exit;
|
||||||
if FCoolBar.AutoSize then Exit;
|
|
||||||
if FCoolBar.BiDiMode = bdLeftToRight then
|
if FCoolBar.BiDiMode = bdLeftToRight then
|
||||||
FControl.Width := Width - FControl.Left - 6
|
FControl.Width := Width - FControl.Left - 6
|
||||||
else if Assigned(FTextLabel) then
|
else if Assigned(FTextLabel) then
|
||||||
@ -181,6 +180,7 @@ end;
|
|||||||
procedure TCoolBand.UpdControl(aLabelWidth: integer);
|
procedure TCoolBand.UpdControl(aLabelWidth: integer);
|
||||||
begin
|
begin
|
||||||
if FCoolBar = Nil then Exit;
|
if FCoolBar = Nil then Exit;
|
||||||
|
Inc(FCoolBar.FUpdateCount);
|
||||||
if Assigned(FTextLabel) then
|
if Assigned(FTextLabel) then
|
||||||
begin
|
begin
|
||||||
if Assigned(FControl) then
|
if Assigned(FControl) then
|
||||||
@ -196,7 +196,7 @@ begin
|
|||||||
if Assigned(FControl) then
|
if Assigned(FControl) then
|
||||||
begin
|
begin
|
||||||
// Calculate left positions and anchoring for text label and control
|
// Calculate left positions and anchoring for text label and control
|
||||||
FControl.Align := alCustom;
|
FControl.Align := alNone; // alCustom does not work here
|
||||||
FControl.Parent := FCoolBar;
|
FControl.Parent := FCoolBar;
|
||||||
FControl.FreeNotification(FCoolBar);
|
FControl.FreeNotification(FCoolBar);
|
||||||
FControl.Top := FTop;
|
FControl.Top := FTop;
|
||||||
@ -225,6 +225,7 @@ begin
|
|||||||
FControl.AnchorSide[akTop].Control := Nil;
|
FControl.AnchorSide[akTop].Control := Nil;
|
||||||
SetControlWidth;
|
SetControlWidth;
|
||||||
end;
|
end;
|
||||||
|
Dec(FCoolBar.FUpdateCount);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCoolBand.SetControl(aValue: TControl);
|
procedure TCoolBand.SetControl(aValue: TControl);
|
||||||
|
Loading…
Reference in New Issue
Block a user