LCL/SpeedButton: Fix misaligned icons in TFilenameEdit etc.

(cherry picked from commit 2b04018e69)
This commit is contained in:
wp_xyz 2022-02-10 14:59:49 +01:00 committed by Maxim Ganetsky
parent 2187550bd5
commit bbac02ab05

View File

@ -1080,13 +1080,13 @@ var
AImageRes: TScaledImageListResolution;
AIndex: Integer;
AEffect: TGraphicsDrawEffect;
begin
if (FGlyph.Glyph.Empty) and ((Images = nil) or (ImageIndex = -1)) then
begin
if (FGlyph.Glyph.Empty) and ((Images = nil) or (ImageIndex = -1)) and (FGlyph.LCLGlyphName <> '') then
begin
Result.CX := 0;
Result.CY := 0;
exit;
end;
end;
FGlyph.GetImageIndexAndEffect(Low(TButtonState), Font.PixelsPerInch,
GetCanvasScaleFactor, AImageRes, AIndex, AEffect);