mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-30 13:09:28 +02:00
dont add empty bitmap to internal imagelist of TButtonGlyph (issue #0010132)
git-svn-id: trunk@12785 -
This commit is contained in:
parent
74d8740bcc
commit
4c109d5542
@ -96,9 +96,12 @@ end;
|
||||
procedure TButtonGlyph.GlyphChanged(Sender: TObject);
|
||||
begin
|
||||
FImages.Clear;
|
||||
FImages.Width := FOriginal.Width div Max(1, FNumGlyphs);
|
||||
FImages.Height := FOriginal.Height;
|
||||
FImages.Add(FOriginal, nil);
|
||||
if (FOriginal.Width > 0) and (FOriginal.Height > 0) then
|
||||
begin
|
||||
FImages.Width := FOriginal.Width div Max(1, FNumGlyphs);
|
||||
FImages.Height := FOriginal.Height;
|
||||
FImages.Add(FOriginal, nil);
|
||||
end;
|
||||
|
||||
if Sender = FOriginal then
|
||||
if Assigned(FOnChange) then
|
||||
|
Loading…
Reference in New Issue
Block a user