use clHighLightText for treeview selected node caption if background is clHighLight (issue #2072)

git-svn-id: trunk@9257 -
This commit is contained in:
vincents 2006-05-10 06:58:11 +00:00
parent 173f5c5a42
commit e5d5b47cb9

View File

@ -3830,13 +3830,17 @@ var
function InvertColor(AColor: TColor): TColor;
var Red, Green, Blue: integer;
begin
Result:=clWhite;
Red:=(AColor shr 16) and $ff;
Green:=(AColor shr 8) and $ff;
Blue:=AColor and $ff;
if Red+Green+Blue>$180 then
Result:=clBlack;
if AColor<>clHighlight then begin
Result:=clWhite;
Red:=(AColor shr 16) and $ff;
Green:=(AColor shr 8) and $ff;
Blue:=AColor and $ff;
if Red+Green+Blue>$180 then
Result:=clBlack;
//DebugLn('[TCustomTreeView.DoPaintNode.InvertColor] Result=',Result,' ',Red,',',Green,',',Blue);
end
else
Result := clHighlightText;
end;
function DrawTreeLines(CurNode: TTreeNode): integer;