LCL: TSpeedButton, TBitBtn: fix autosize on image* change. Issue #33645

git-svn-id: trunk@57705 -
This commit is contained in:
ondrej 2018-04-25 08:16:40 +00:00
parent 2ef8957cd8
commit e5e905ef3e
2 changed files with 8 additions and 0 deletions

View File

@ -175,11 +175,15 @@ begin
FButtonGlyph.ExternalImages.FreeNotification(Self);
FButtonGlyph.ExternalImages.RegisterChanges(FImageChangeLink);
end;
InvalidatePreferredSize;
AdjustSize;
end;
procedure TCustomBitBtn.SetImageWidth(const aImageWidth: Integer);
begin
FButtonGlyph.ExternalImageWidth := aImageWidth;
InvalidatePreferredSize;
AdjustSize;
end;
procedure TCustomBitBtn.GlyphChanged(Sender: TObject);

View File

@ -229,11 +229,15 @@ begin
FGlyph.ExternalImages.FreeNotification(Self);
FGlyph.ExternalImages.RegisterChanges(FImageChangeLink);
end;
InvalidatePreferredSize;
AdjustSize;
end;
procedure TCustomSpeedButton.SetImageWidth(const aImageWidth: Integer);
begin
FGlyph.ExternalImageWidth := aImageWidth;
InvalidatePreferredSize;
AdjustSize;
end;
{------------------------------------------------------------------------------