TAChart: Legend resolves clDefault (better dark mode). Default Chart.Color is clForm now.

git-svn-id: trunk@64664 -
This commit is contained in:
wp 2021-02-24 22:41:15 +00:00
parent 0b71099783
commit 99b12d5c6b
2 changed files with 7 additions and 5 deletions
components/tachart

View File

@ -475,7 +475,7 @@ type
property Anchors;
property BiDiMode;
property BorderSpacing;
property Color default clWindow;
property Color default clForm;
property Constraints;
property DoubleBuffered;
property DragCursor;
@ -727,7 +727,7 @@ begin
Height := DEFAULT_CHART_HEIGHT;
FSeries := TChartSeriesList.Create;
Color := clWindow;
Color := clForm;
FBackColor := clWindow;
FIsZoomed := false;
FLegend := TChartLegend.Create(Self);

View File

@ -697,9 +697,11 @@ begin
drawer.SetTransparency(Transparency);
try
drawer.Brush := BackgroundBrush;
if Frame.Visible then
drawer.Pen := Frame
else
if Frame.Visible then begin
drawer.Pen := Frame;
if Frame.Color = clDefault then
drawer.SetPenColor(FOwner.GetDefaultColor(dctFont));
end else
drawer.SetPenParams(psClear, clTAColor);
r := AData.FBounds;
drawer.Rectangle(r);