mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-21 15:10:04 +01:00
customdrawn: Starts adaption for LCL-CustomDrawn, uses the double buffer only when necessary
git-svn-id: trunk@33854 -
This commit is contained in:
parent
46d42d5464
commit
f364f5e1fc
@ -11,6 +11,10 @@ unit customdrawncontrols;
|
|||||||
|
|
||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
{$if defined(LCLWin32)}
|
||||||
|
{$define CDControlsDoDoubleBuffer}
|
||||||
|
{$endif}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
@ -801,6 +805,7 @@ begin
|
|||||||
|
|
||||||
PrepareCurrentDrawer();
|
PrepareCurrentDrawer();
|
||||||
|
|
||||||
|
{$ifdef CDControlsDoDoubleBuffer}
|
||||||
ABmp := TBitmap.Create;
|
ABmp := TBitmap.Create;
|
||||||
try
|
try
|
||||||
ABmp.Width := Width;
|
ABmp.Width := Width;
|
||||||
@ -815,6 +820,14 @@ begin
|
|||||||
finally
|
finally
|
||||||
ABmp.Free;
|
ABmp.Free;
|
||||||
end;
|
end;
|
||||||
|
{$else}
|
||||||
|
lSize := Size(Width, Height);
|
||||||
|
lControlId := GetControlId();
|
||||||
|
PrepareControlState;
|
||||||
|
PrepareControlStateEx;
|
||||||
|
FDrawer.DrawControl(Canvas, Point(0, 0),
|
||||||
|
lSize, lControlId, FState, FStateEx);
|
||||||
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCDControl.MouseEnter;
|
procedure TCDControl.MouseEnter;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user