Cocoa: bitbtn: handle glyphs only if they are really visible

git-svn-id: trunk@57923 -
This commit is contained in:
ondrej 2018-05-13 12:51:32 +00:00
parent 6c60f25968
commit 0a0c499b42

View File

@ -128,7 +128,7 @@ var
begin
//WriteLn('[TCocoaWSBitBtn.SetGlyph]');
Img := nil;
if ABitBtn.CanShowGlyph then
if ABitBtn.CanShowGlyph(True) then
begin
AGlyph := TBitmap.Create;
AValue.GetImageIndexAndEffect(bsUp, ABitBtn.Font.PixelsPerInch,
@ -158,7 +158,7 @@ var
ImagePos: NSCellImagePosition;
begin
if (ABitBtn.CanShowGlyph) then
if ABitBtn.CanShowGlyph(True) then
ImagePos := LCLGlyphPosToCocoa(AValue)
else
ImagePos := NSNoImage;