Skip to content

Commit 95ea152

Browse files
committed
Fixed background color in the class treeview.
1 parent 195f24d commit 95ea152

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Source/VCL/ClassBrowsing/ClassBrowser.pas

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ interface
2424
uses
2525
{$IFDEF WIN32}
2626
Windows, Classes, SysUtils, IntList, StatementList, Controls, ComCtrls, Graphics,
27-
CppParser, Forms, cbutils;
27+
CppParser, Forms, Vcl.Themes, cbutils;
2828
{$ENDIF}
2929
{$IFDEF LINUX}
3030
Classes, SysUtils, QControls, QComCtrls, QForms, QGraphics,
@@ -502,7 +502,16 @@ procedure TClassBrowser.AdvancedCustomDrawItem(Sender: TCustomTreeView; Node: TT
502502
if bInherited then
503503
fControlCanvas.Font.Color := clGray
504504
else
505-
fControlCanvas.Font.Color := clMaroon;
505+
begin
506+
var TextColor := clMaroon;
507+
case StyleServices.GetStyleFontColor(sfTabTextActiveNormal) of
508+
16777215: TextColor := clMoneyGreen; // Slate Gray
509+
14803425: TextColor := clSkyBlue; // Blue Whale
510+
end;
511+
fControlCanvas.Font.Color := TextColor;
512+
end;
513+
514+
fControlCanvas.Brush.Color := StyleServices.GetStyleColor(scTreeView);
506515
fControlCanvas.TextOut(DrawPoint.X, DrawPoint.Y + 2, st^._Args); // center vertically
507516
Inc(DrawPoint.X, fControlCanvas.TextWidth(st^._Args) + 3); // add some right padding
508517
end;
@@ -515,6 +524,7 @@ procedure TClassBrowser.AdvancedCustomDrawItem(Sender: TCustomTreeView; Node: TT
515524
// Then draw node type to the right of the arguments
516525
if TypeText <> '' then begin
517526
fControlCanvas.Font.Color := clGray;
527+
fControlCanvas.Brush.Color := StyleServices.GetStyleColor(scTreeView);
518528
fControlCanvas.TextOut(DrawPoint.X, DrawPoint.Y + 2, ': ' + TypeText); // center vertically
519529
end;
520530
except // stick head into sand method. sometimes during painting, the PStatement is invalid

0 commit comments

Comments
 (0)