LCL: Revert 0c285d6eb9 (fixes issue #39861).

(cherry picked from commit 7950515229)
This commit is contained in:
wp_xyz 2022-08-17 22:59:27 +02:00 committed by Maxim Ganetsky
parent e1205b4733
commit cc48d6c1d7
2 changed files with 1 additions and 18 deletions

View File

@ -91,7 +91,6 @@ type
AlignInfo: TAlignInfo); override;
procedure CalculatePreferredSize(var PreferredWidth,
PreferredHeight: integer; WithThemeSpace: Boolean); override;
procedure Loaded; override;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
procedure SetAlign(Value: TAlign); override;
procedure CMAppShowBtnGlyphChanged(var Message: TLMessage); message CM_APPSHOWBTNGLYPHCHANGED;
@ -485,12 +484,6 @@ begin
end;
end;
procedure TCustomButtonPanel.Loaded;
begin
inherited;
DoShowGlyphs;
end;
procedure TCustomButtonPanel.Notification(AComponent: TComponent;
Operation: TOperation);
var

View File

@ -314,17 +314,7 @@ begin
idButton := BitBtnImages[Kind];
if (idButton >= Low(BitBtnResNames)) and (idButton <= High(BitBtnResNames))
and (BitBtnResNames[idButton] <> '') then
begin
FButtonGlyph.LCLGlyphName := BitBtnResNames[idButton];
CustomGlyph := GetLCLDefaultBtnGlyph(Kind);
try
if not Assigned(Glyph) then
Glyph := TBitmap.Create;
Glyph.Assign(CustomGlyph);
finally
CustomGlyph.Free;
end;
end
FButtonGlyph.LCLGlyphName := BitBtnResNames[idButton]
else
ImageIndex := -1;
GlyphValid := True;