From 72e53e15ea285eb2eac160a748780e06939c6b7f Mon Sep 17 00:00:00 2001 From: tombo Date: Tue, 11 Nov 2008 15:17:37 +0000 Subject: [PATCH] LCL TreeView: improved PaintNode code - Canvas.Font.Color should be correct in AdvencedCustomDraw git-svn-id: trunk@17344 - --- lcl/include/treeview.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lcl/include/treeview.inc b/lcl/include/treeview.inc index 40415e0604..6ff328c1ed 100644 --- a/lcl/include/treeview.inc +++ b/lcl/include/treeview.inc @@ -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