mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 12:39:15 +02:00
Gtk2: bitbtn: handle glyphs only if they are really visible
git-svn-id: trunk@57924 -
This commit is contained in:
parent
0a0c499b42
commit
4c167b9cba
@ -350,14 +350,14 @@ var
|
||||
AEffect: TGraphicsDrawEffect;
|
||||
AImageRes: TScaledImageListResolution;
|
||||
begin
|
||||
ShowGlyph := ABitBtn.CanShowGlyph;
|
||||
ShowGlyph := ABitBtn.CanShowGlyph(True);
|
||||
if ShowGlyph then
|
||||
begin
|
||||
ImageWidget := BitBtnInfo^.ImageWidget;
|
||||
AGlyph := TBitmap.Create;
|
||||
AValue.GetImageIndexAndEffect(AButtonState, ABitBtn.Font.PixelsPerInch,
|
||||
ABitBtn.GetCanvasScaleFactor, AImageRes, AIndex, AEffect);
|
||||
if (AIndex <> -1) and (AImageRes.Resolution <> nil) then
|
||||
if (AIndex <> -1) and AImageRes.Valid then
|
||||
AImageRes.GetBitmap(AIndex, AGlyph, AEffect);
|
||||
ShowGlyph := not AGlyph.Empty;
|
||||
if ShowGlyph then
|
||||
|
Loading…
Reference in New Issue
Block a user