mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 01:16:18 +02:00
LCL: TCustomTreeView.DoPaint use of cdPrePaint and cdPostPaint, issue #21761, patch from David Jenkins
git-svn-id: trunk@36820 -
This commit is contained in:
parent
82de387f29
commit
cae1ee33c9
@ -2879,7 +2879,7 @@ type
|
||||
function GetNodeDrawAreaHeight: integer;
|
||||
function GetNodeDrawAreaWidth: integer;
|
||||
function IsCustomDrawn(Target: TCustomDrawTarget;
|
||||
Stage: TCustomDrawStage): Boolean;
|
||||
Stage: TCustomDrawStage): Boolean; virtual;
|
||||
function IsNodeVisible(ANode: TTreeNode): Boolean;
|
||||
function IsNodeHeightFullVisible(ANode: TTreeNode): Boolean;
|
||||
function IsInsertMarkVisible: boolean; virtual;
|
||||
|
@ -4412,7 +4412,7 @@ begin
|
||||
UpdateScrollbars;
|
||||
with Canvas do
|
||||
begin
|
||||
if Assigned(FOnCustomDraw) or Assigned(FOnAdvancedCustomDraw) then
|
||||
if IsCustomDrawn(dtControl, cdPrePaint) then
|
||||
begin
|
||||
DrawRect := ClientRect;
|
||||
if not CustomDraw(DrawRect, cdPrePaint) then exit;
|
||||
@ -4474,7 +4474,7 @@ begin
|
||||
LineTo((ClientWidth - ScrollBarWidth) - 1 - a, (ClientHeight - ScrollBarWidth) - 1 - a);
|
||||
LineTo(a, (ClientHeight-ScrollBarWidth) - 1 - a);
|
||||
end;
|
||||
if Assigned(FOnCustomDraw) or Assigned(FOnAdvancedCustomDraw) then
|
||||
if IsCustomDrawn(dtControl, cdPostPaint) then
|
||||
begin
|
||||
DrawRect := ClientRect;
|
||||
if not CustomDraw(DrawRect, cdPostPaint) then exit;
|
||||
@ -4838,7 +4838,7 @@ begin
|
||||
Exit;
|
||||
NodeSelected := (Node.Selected) or (Node.MultiSelected);
|
||||
Canvas.Font.Color := Font.Color;
|
||||
if Assigned(OnCustomDrawItem) or Assigned(FOnAdvancedCustomDrawItem) then
|
||||
if IsCustomDrawn(dtItem, cdPrePaint) then
|
||||
begin
|
||||
DrawState := [];
|
||||
if NodeSelected then
|
||||
@ -4922,7 +4922,7 @@ begin
|
||||
// draw insert mark
|
||||
DrawInsertMark;
|
||||
end;
|
||||
if Assigned(OnCustomDrawItem) or Assigned(FOnAdvancedCustomDrawItem) then
|
||||
if IsCustomDrawn(dtItem, cdPostPaint) then
|
||||
begin
|
||||
DrawState:=[];
|
||||
if Node.Selected then
|
||||
|
Loading…
Reference in New Issue
Block a user