Recent

Author Topic: GTK3 icons render in ATFlatControls  (Read 311 times)

Alextp

  • Hero Member
  • *****
  • Posts: 1048
    • UVviewsoft
GTK3 icons render in ATFlatControls
« on: April 23, 2020, 07:36:31 am »
I get last Lazarus trunk, it has many gtk3 fixes.
now I testd ATFlatControls with gtk3.
it shows bad icons on ATButton. icons from TPicture and from TImagelist.
code paints icon on control's Canvas. it is canvas on control, not bitmap.

demo: app/demo_buttons.

file atbuttons.pas:
Code: Pascal  [Select][+][-]
  1. procedure TATButton.PaintIcon(C: TCanvas; AX, AY: integer);
  2. begin
  3.   if Assigned(FImages) and (FImageIndex>=0) and (FImageIndex<FImages.Count) then
  4.     FImages.Draw(C, AX, AY, FImageIndex)
  5.   else
  6.   if Assigned(FPicture) then
  7.     C.Draw(AX, AY, FPicture.Graphic);
  8. end;
  9.  

 

TinyPortal © 2005-2018