Examples, canvas_test: added workaround to avoid shaped window example crash on GTK2

This commit is contained in:
alligator 2025-04-24 13:14:01 +00:00 committed by Maxim Ganetsky
parent a99f5fc2bf
commit 087932ec05

View File

@ -42,9 +42,12 @@ var
begin
Shape := TBitmap.Create;
try
Shape.Width := 200;
Shape.Height := 200;
Shape.Canvas.Ellipse(0, 0, 200, 200);
{$IFDEF LCLGtk2}
Shape.Monochrome := True;
{$ENDIF}
Shape.Width := Width;
Shape.Height := Height;
Shape.Canvas.Ellipse(0, 0, Width, Height);
SetShape(Shape);
finally
Shape.Free;