mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 17:19:23 +02:00
LCL: TSpeedButton, TBitBtn: fix autosize on image* change. Issue #33645
git-svn-id: trunk@57705 -
This commit is contained in:
parent
2ef8957cd8
commit
e5e905ef3e
@ -175,11 +175,15 @@ begin
|
|||||||
FButtonGlyph.ExternalImages.FreeNotification(Self);
|
FButtonGlyph.ExternalImages.FreeNotification(Self);
|
||||||
FButtonGlyph.ExternalImages.RegisterChanges(FImageChangeLink);
|
FButtonGlyph.ExternalImages.RegisterChanges(FImageChangeLink);
|
||||||
end;
|
end;
|
||||||
|
InvalidatePreferredSize;
|
||||||
|
AdjustSize;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomBitBtn.SetImageWidth(const aImageWidth: Integer);
|
procedure TCustomBitBtn.SetImageWidth(const aImageWidth: Integer);
|
||||||
begin
|
begin
|
||||||
FButtonGlyph.ExternalImageWidth := aImageWidth;
|
FButtonGlyph.ExternalImageWidth := aImageWidth;
|
||||||
|
InvalidatePreferredSize;
|
||||||
|
AdjustSize;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomBitBtn.GlyphChanged(Sender: TObject);
|
procedure TCustomBitBtn.GlyphChanged(Sender: TObject);
|
||||||
|
@ -229,11 +229,15 @@ begin
|
|||||||
FGlyph.ExternalImages.FreeNotification(Self);
|
FGlyph.ExternalImages.FreeNotification(Self);
|
||||||
FGlyph.ExternalImages.RegisterChanges(FImageChangeLink);
|
FGlyph.ExternalImages.RegisterChanges(FImageChangeLink);
|
||||||
end;
|
end;
|
||||||
|
InvalidatePreferredSize;
|
||||||
|
AdjustSize;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomSpeedButton.SetImageWidth(const aImageWidth: Integer);
|
procedure TCustomSpeedButton.SetImageWidth(const aImageWidth: Integer);
|
||||||
begin
|
begin
|
||||||
FGlyph.ExternalImageWidth := aImageWidth;
|
FGlyph.ExternalImageWidth := aImageWidth;
|
||||||
|
InvalidatePreferredSize;
|
||||||
|
AdjustSize;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user