mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 05:19:31 +02:00
LCL: TButtonPanel: reduce overhead while button creation
git-svn-id: trunk@27597 -
This commit is contained in:
parent
94827d66c8
commit
3268c9ce5e
@ -328,7 +328,6 @@ begin
|
||||
if FButtons[TabOrders[FButtonOrder, i]] = nil then Continue;
|
||||
FButtons[TabOrders[FButtonOrder, i]].TabOrder := High(TabOrders[FButtonOrder]) - i;
|
||||
end;
|
||||
Realign;
|
||||
end;
|
||||
|
||||
procedure TCustomButtonPanel.SetAlign(Value: TAlign);
|
||||
@ -338,7 +337,6 @@ begin
|
||||
inherited SetAlign(Value);
|
||||
UpdateBevel;
|
||||
UpdateSizes;
|
||||
Realign;
|
||||
finally
|
||||
EnableAutoSizing;
|
||||
end;
|
||||
@ -478,7 +476,6 @@ begin
|
||||
with FButtons[AButton] do
|
||||
begin
|
||||
Name := NAMES[AButton];
|
||||
Parent := Self;
|
||||
Kind := KINDS[AButton];
|
||||
Constraints.MinWidth := DefButtonSize.cx;
|
||||
Constraints.MinHeight := DefButtonSize.cy;
|
||||
@ -496,8 +493,9 @@ begin
|
||||
then Glyph.Assign(FGlyphs[AButton])
|
||||
else Glyph.Assign(nil);
|
||||
// set default
|
||||
if AButton = FDefaultButton
|
||||
then Default := True;
|
||||
Default := AButton = FDefaultButton;
|
||||
|
||||
Parent := Self;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user