LCL: Fixed ParentBackground of GroupBoxes cannot be set to true. Issue #38777

git-svn-id: trunk@65036 -
This commit is contained in:
michl 2021-04-20 21:57:55 +00:00
parent 72963f6adb
commit df1e1dc31a
2 changed files with 6 additions and 4 deletions

View File

@ -98,8 +98,9 @@ end;
procedure TCustomFrame.SetColor(Value: TColor);
begin
inherited SetColor(Value);
if Color <> clDefault then
ParentBackground := False;
if Color = clDefault then Exit;
if Assigned(Parent) and (Value = Parent.Color) then Exit;
ParentBackground := False;
end;
procedure TCustomFrame.SetParent(AParent: TWinControl);

View File

@ -50,8 +50,9 @@ end;
procedure TCustomGroupBox.SetColor(Value: TColor);
begin
inherited SetColor(Value);
if Color <> clDefault then
ParentBackground := False;
if Color = clDefault then Exit;
if Assigned(Parent) and (Value = Parent.Color) then Exit;
ParentBackground := False;
end;
{------------------------------------------------------------------------------