mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-20 06:39:23 +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+}
|
||||
|
||||
{$if defined(LCLWin32)}
|
||||
{$define CDControlsDoDoubleBuffer}
|
||||
{$endif}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
@ -801,6 +805,7 @@ begin
|
||||
|
||||
PrepareCurrentDrawer();
|
||||
|
||||
{$ifdef CDControlsDoDoubleBuffer}
|
||||
ABmp := TBitmap.Create;
|
||||
try
|
||||
ABmp.Width := Width;
|
||||
@ -815,6 +820,14 @@ begin
|
||||
finally
|
||||
ABmp.Free;
|
||||
end;
|
||||
{$else}
|
||||
lSize := Size(Width, Height);
|
||||
lControlId := GetControlId();
|
||||
PrepareControlState;
|
||||
PrepareControlStateEx;
|
||||
FDrawer.DrawControl(Canvas, Point(0, 0),
|
||||
lSize, lControlId, FState, FStateEx);
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
procedure TCDControl.MouseEnter;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user