Compare commits

...

5 Commits

Author SHA1 Message Date
robert rozee
54f8aff8bb Merge branch 'main' into 'main'
fix for TControl.GetDefaultColor never recursing up to parent

See merge request freepascal.org/lazarus/lazarus!452
2025-04-03 21:50:38 +00:00
Maxim Ganetsky
d88e3444dd JCF2: restored i18n of a caption after 34a6103a12 2025-04-04 00:48:47 +03:00
robert rozee
d070dd6b88 Edit control.inc,
fix for TControl.GetDefaultColor never recursing up to parent as it should. looks like
the original code was 'mangled' by a bad cut-and-paste a number of years back.
2025-03-16 10:27:54 +00:00
robert rozee
b3ce2c3b9b Merge branch lazarus:main into main 2025-03-16 10:18:25 +00:00
robert rozee
e0cc3cca3e Edit inputdialog.inc 2025-03-05 13:42:31 +00:00
3 changed files with 5 additions and 5 deletions

View File

@ -233,7 +233,7 @@ begin
rgWriteSettingsFile.Caption := lisCnfGenWriteSettings;
rgWriteSettingsFile.Items[0] := lisCnfGenAlways;
rgWriteSettingsFile.Items[1] := lisCnfGenFail;
//rgWriteSettingsFile.Items[2] := lisCnfGenNever;
rgWriteSettingsFile.Items[2] := lisCnfGenNever;
rgShowParseTree.Caption := lisCnfGenShowParseTree;
rgShowParseTree.Items[0] := lisCnfGenAlways;
rgShowParseTree.Items[1] := lisCnfGenOnParseError;

View File

@ -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;

View File

@ -81,6 +81,7 @@ begin
Parent := Form;
ShowBevel := False;
ShowButtons := [pbOK, pbCancel];
Color:=Parent.GetDefaultColor(dctBrush); // fix for wrong background colour
Align := alTop;
end;