mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-11 04:48:03 +02:00
use clHighLightText for treeview selected node caption if background is clHighLight (issue #2072)
git-svn-id: trunk@9257 -
This commit is contained in:
parent
173f5c5a42
commit
e5d5b47cb9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user