mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 12:18:03 +02:00
Cocoa: revert not working TBitBtn retina glyph support
git-svn-id: trunk@57848 -
This commit is contained in:
parent
014d35df8e
commit
a6549c23c1
@ -132,13 +132,13 @@ begin
|
||||
begin
|
||||
AGlyph := TBitmap.Create;
|
||||
AValue.GetImageIndexAndEffect(bsUp, ABitBtn.Font.PixelsPerInch,
|
||||
ABitBtn.GetCanvasScaleFactor, AImgRes, AIndex, AEffect);
|
||||
1{To-Do: ABitBtn.GetCanvasScaleFactor}, AImgRes, AIndex, AEffect);
|
||||
AImgRes.GetBitmap(AIndex, AGlyph, AEffect);
|
||||
Img := TCocoaBitmap(AGlyph.Handle).image;
|
||||
lButtonHandle := TCocoaButton(ABitBtn.Handle);
|
||||
lButtonHandle.setImage(Img);
|
||||
lButtonHandle.setImagePosition(LCLGlyphPosToCocoa(ABitBtn.Layout));
|
||||
//To-Do: lButtonHandle.setMatchesOnlyOnBestFittingAxis(True);
|
||||
//To-Do: tell Cocoa lButtonHandle should not scale the image (and enable ABitBtn.GetCanvasScaleFactor above)
|
||||
if Assigned(lButtonHandle.Glyph) then
|
||||
FreeAndNil(lButtonHandle.Glyph);
|
||||
lButtonHandle.Glyph := AGlyph;
|
||||
|
Loading…
Reference in New Issue
Block a user