mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-14 16:41:23 +02:00
LCL TreeView: improved PaintNode code - Canvas.Font.Color should be correct in AdvencedCustomDraw
git-svn-id: trunk@17344 -
This commit is contained in:
parent
42b8e648ce
commit
72e53e15ea
@ -4298,7 +4298,7 @@ var
|
|||||||
|
|
||||||
var
|
var
|
||||||
x, ImgIndex: integer;
|
x, ImgIndex: integer;
|
||||||
CurBackgroundColor, OldFontColor: TColor;
|
CurBackgroundColor: TColor;
|
||||||
CurTextRect: TRect;
|
CurTextRect: TRect;
|
||||||
DrawState: TCustomDrawState;
|
DrawState: TCustomDrawState;
|
||||||
PaintImages: boolean;
|
PaintImages: boolean;
|
||||||
@ -4377,15 +4377,16 @@ begin
|
|||||||
CurTextRect:=NodeRect;
|
CurTextRect:=NodeRect;
|
||||||
CurTextRect.Left:=x;
|
CurTextRect.Left:=x;
|
||||||
CurTextRect.Right:=x+TextWidth(Node.Text);
|
CurTextRect.Right:=x+TextWidth(Node.Text);
|
||||||
OldFontColor:=Font.Color;
|
|
||||||
Font.Color:=InvertColor(Brush.Color);
|
Font.Color:=InvertColor(Brush.Color);
|
||||||
FillRect(CurTextRect);
|
FillRect(CurTextRect);
|
||||||
TextOut(x,TextY,Node.Text);
|
TextOut(x,TextY,Node.Text);
|
||||||
Font.Color:=OldFontColor;
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
begin
|
||||||
|
Font.Color := Self.Font.Color;
|
||||||
TextOut(x,TextY,Node.Text);
|
TextOut(x,TextY,Node.Text);
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
// draw separator
|
// draw separator
|
||||||
if (tvoShowSeparators in FOptions) then
|
if (tvoShowSeparators in FOptions) then
|
||||||
|
Loading…
Reference in New Issue
Block a user