diff --git a/lcl/include/control.inc b/lcl/include/control.inc index 004fd1c158..85c1fca20c 100644 --- a/lcl/include/control.inc +++ b/lcl/include/control.inc @@ -1434,11 +1434,10 @@ const ); begin Result := TWSControlClass(WidgetSetClass).GetDefaultColor(Self, DefaultColorType); - if (Result = clDefault) then - if ParentColor and Assigned(Parent) then - Result := Parent.GetDefaultColor(DefaultColorType) + if (Self.Color = clDefault) and ParentColor and Assigned(Parent) then + Result := Parent.GetDefaultColor(DefaultColorType) // recursion else - Result := DefColors[DefaultColorType]; + if Result = clDefault then Result := DefColors[DefaultColorType]; // backstop end; function TControl.GetColorResolvingParent: TColor; diff --git a/lcl/include/inputdialog.inc b/lcl/include/inputdialog.inc index 6fc0c1e8e6..4aaa22eda1 100644 --- a/lcl/include/inputdialog.inc +++ b/lcl/include/inputdialog.inc @@ -81,6 +81,7 @@ begin Parent := Form; ShowBevel := False; ShowButtons := [pbOK, pbCancel]; + Color:=Parent.GetDefaultColor(dctBrush); // fix for wrong background colour Align := alTop; end;