mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 05:59:28 +02:00
IDE: use 24bit bitmap in Gtk2 for scaling.
git-svn-id: trunk@54289 -
This commit is contained in:
parent
9e5332edbc
commit
4c5531e408
@ -185,9 +185,14 @@ function TIDEImages.LoadImage(ImageSize: Integer; ImageName: String): Integer;
|
||||
begin
|
||||
Bmp := TBitmap.Create;
|
||||
try
|
||||
{$IFDEF LCLGtk2}
|
||||
Bmp.PixelFormat := pf24bit;
|
||||
Bmp.Canvas.Brush.Color := clBtnFace;
|
||||
{$ELSE}
|
||||
Bmp.PixelFormat := pf32bit;
|
||||
Bmp.SetSize(AList.Width, AList.Height);
|
||||
Bmp.Canvas.Brush.Color := TColor($FFFFFFFF);
|
||||
{$ENDIF}
|
||||
Bmp.SetSize(AList.Width, AList.Height);
|
||||
Bmp.Canvas.FillRect(Bmp.Canvas.ClipRect);
|
||||
Bmp.Canvas.StretchDraw(
|
||||
Rect(0, 0, MulDiv(Grp.Width, ScalePercent, 100), MulDiv(Grp.Height, ScalePercent, 100)),
|
||||
|
Loading…
Reference in New Issue
Block a user