mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-08 12:39:18 +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,6 +3830,7 @@ var
|
|||||||
function InvertColor(AColor: TColor): TColor;
|
function InvertColor(AColor: TColor): TColor;
|
||||||
var Red, Green, Blue: integer;
|
var Red, Green, Blue: integer;
|
||||||
begin
|
begin
|
||||||
|
if AColor<>clHighlight then begin
|
||||||
Result:=clWhite;
|
Result:=clWhite;
|
||||||
Red:=(AColor shr 16) and $ff;
|
Red:=(AColor shr 16) and $ff;
|
||||||
Green:=(AColor shr 8) and $ff;
|
Green:=(AColor shr 8) and $ff;
|
||||||
@ -3837,6 +3838,9 @@ var
|
|||||||
if Red+Green+Blue>$180 then
|
if Red+Green+Blue>$180 then
|
||||||
Result:=clBlack;
|
Result:=clBlack;
|
||||||
//DebugLn('[TCustomTreeView.DoPaintNode.InvertColor] Result=',Result,' ',Red,',',Green,',',Blue);
|
//DebugLn('[TCustomTreeView.DoPaintNode.InvertColor] Result=',Result,' ',Red,',',Green,',',Blue);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
Result := clHighlightText;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function DrawTreeLines(CurNode: TTreeNode): integer;
|
function DrawTreeLines(CurNode: TTreeNode): integer;
|
||||||
|
Loading…
Reference in New Issue
Block a user