LCL TreeView: improved PaintNode code - Canvas.Font.Color should be correct in AdvencedCustomDraw

git-svn-id: trunk@17344 -
This commit is contained in:
tombo 2008-11-11 15:17:37 +00:00
parent 42b8e648ce
commit 72e53e15ea

View File

@ -4298,7 +4298,7 @@ var
var
x, ImgIndex: integer;
CurBackgroundColor, OldFontColor: TColor;
CurBackgroundColor: TColor;
CurTextRect: TRect;
DrawState: TCustomDrawState;
PaintImages: boolean;
@ -4377,14 +4377,15 @@ begin
CurTextRect:=NodeRect;
CurTextRect.Left:=x;
CurTextRect.Right:=x+TextWidth(Node.Text);
OldFontColor:=Font.Color;
Font.Color:=InvertColor(Brush.Color);
FillRect(CurTextRect);
TextOut(x,TextY,Node.Text);
Font.Color:=OldFontColor;
end
else
begin
Font.Color := Self.Font.Color;
TextOut(x,TextY,Node.Text);
end;
end;
// draw separator