mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 02:19:09 +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
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user