mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-07-08 07:06:23 +02:00
lcl TLabel: unbind Color and Transparent to fix ParentColor issues (fixes)
This commit is contained in:
parent
b46504f61e
commit
1837c65413
@ -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);
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user