lcl TLabel: unbind Color and Transparent to fix ParentColor issues (fixes)

This commit is contained in:
Ondrej Pokorny 2022-05-03 20:39:23 +02:00
parent b46504f61e
commit 1837c65413
2 changed files with 2 additions and 8 deletions

View File

@ -394,11 +394,6 @@ begin
end; end;
end; end;
function TCustomLabel.ColorIsStored: boolean;
begin
Result := (Color <> clNone);
end;
{------------------------------------------------------------------------------- {-------------------------------------------------------------------------------
function TCustomLabel.AdjustFontForOptimalFill: Boolean; function TCustomLabel.AdjustFontForOptimalFill: Boolean;
@ -433,7 +428,7 @@ const
begin begin
R := Rect(0,0,Width,Height); R := Rect(0,0,Width,Height);
Canvas.Brush.Color := Color; Canvas.Brush.Color := Color;
if (Color<>clNone) and not Transparent then if not Transparent then
begin begin
Canvas.Brush.Style:=bsSolid; Canvas.Brush.Style:=bsSolid;
Canvas.FillRect(R); Canvas.FillRect(R);

View File

@ -1606,12 +1606,11 @@ type
function CalcFittingFontHeight(const TheText: string; function CalcFittingFontHeight(const TheText: string;
MaxWidth, MaxHeight: Integer; MaxWidth, MaxHeight: Integer;
out FontHeight, NeededWidth, NeededHeight: Integer): Boolean; out FontHeight, NeededWidth, NeededHeight: Integer): Boolean;
function ColorIsStored: boolean; override;
function AdjustFontForOptimalFill: Boolean; function AdjustFontForOptimalFill: Boolean;
procedure Paint; override; procedure Paint; override;
procedure SetBounds(aLeft, aTop, aWidth, aHeight: integer); override; procedure SetBounds(aLeft, aTop, aWidth, aHeight: integer); override;
property AutoSize default True; property AutoSize default True;
property Color default clDefault; property Color nodefault;
end; end;