From bbac02ab05eaf9dae6fc5fd86a5766637dad2f45 Mon Sep 17 00:00:00 2001 From: wp_xyz Date: Thu, 10 Feb 2022 14:59:49 +0100 Subject: [PATCH] LCL/SpeedButton: Fix misaligned icons in TFilenameEdit etc. (cherry picked from commit 2b04018e69cfd5fa5f43358a07272dd15b508997) --- lcl/include/speedbutton.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lcl/include/speedbutton.inc b/lcl/include/speedbutton.inc index d1ba6c821c..50fd50b9f2 100644 --- a/lcl/include/speedbutton.inc +++ b/lcl/include/speedbutton.inc @@ -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);