mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 18:30:44 +02:00
lcl: draw treeitem text using appropriate themed colors
git-svn-id: trunk@24877 -
This commit is contained in:
parent
259ffb70f6
commit
86b00d4f17
@ -4530,10 +4530,6 @@ var
|
|||||||
else
|
else
|
||||||
Details := ThemeServices.GetElementDetails(ttItemNormal);
|
Details := ThemeServices.GetElementDetails(ttItemNormal);
|
||||||
|
|
||||||
if ( (tvoThemedDraw in Options) or
|
|
||||||
(tvoRowSelect in Options) ) and IsSelected then
|
|
||||||
Canvas.Font.Color := InvertColor(Brush.Color);
|
|
||||||
|
|
||||||
ThemeServices.DrawText(Canvas, Details, AText, NodeRect, DT_CENTER or DT_VCENTER, 0);
|
ThemeServices.DrawText(Canvas, Details, AText, NodeRect, DT_CENTER or DT_VCENTER, 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -2347,6 +2347,16 @@ begin
|
|||||||
Inc(R.Top, 1);
|
Inc(R.Top, 1);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
if (Details.Element = teTreeview) and (Details.Part = TVP_TREEITEM) then
|
||||||
|
begin
|
||||||
|
case Details.State of
|
||||||
|
TREIS_SELECTED,
|
||||||
|
TREIS_HOTSELECTED: Canvas.Font.Color := clHighlightText;
|
||||||
|
TREIS_SELECTEDNOTFOCUS: Canvas.Font.Color := clBtnText;
|
||||||
|
else
|
||||||
|
Canvas.Font.Color := clWindowText;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
Canvas.TextRect(R, R.Left, R.Top, S, TXTStyle);
|
Canvas.TextRect(R, R.Left, R.Top, S, TXTStyle);
|
||||||
Canvas.Font.Color := OldColor;
|
Canvas.Font.Color := OldColor;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user