mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 01:39:25 +02:00
fix ControlStyle csOpaque for TCustomLabel (not opaque when transparent)
git-svn-id: trunk@8240 -
This commit is contained in:
parent
5396e4caf5
commit
cced0352b3
@ -152,8 +152,7 @@ constructor TCustomLabel.Create(TheOwner: TComponent);
|
|||||||
begin
|
begin
|
||||||
inherited Create(TheOwner);
|
inherited Create(TheOwner);
|
||||||
Font.OnChange := @FontChange;
|
Font.OnChange := @FontChange;
|
||||||
ControlStyle := [csSetCaption, csOpaque, csClickEvents, csDoubleClicks,
|
ControlStyle := [csSetCaption, csClickEvents, csDoubleClicks, csReplicatable];
|
||||||
csReplicatable];
|
|
||||||
Width := 65;
|
Width := 65;
|
||||||
Height := 17;
|
Height := 17;
|
||||||
FShowAccelChar := True;
|
FShowAccelChar := True;
|
||||||
@ -166,6 +165,17 @@ begin
|
|||||||
Result := Color = clNone;
|
Result := Color = clNone;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCustomLabel.SetColor(NewColor: TColor);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
|
||||||
|
// if color = clnone then transparent, so not opaque
|
||||||
|
if NewColor = clNone then
|
||||||
|
ControlStyle := ControlStyle - [csOpaque]
|
||||||
|
else
|
||||||
|
ControlStyle := ControlStyle + [csOpaque];
|
||||||
|
end;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
Method: TCustomLabel.SetLayout
|
Method: TCustomLabel.SetLayout
|
||||||
Params: None
|
Params: None
|
||||||
|
@ -1140,6 +1140,7 @@ type
|
|||||||
function GetAlignment: TAlignment;
|
function GetAlignment: TAlignment;
|
||||||
function GetTransparent: boolean;
|
function GetTransparent: boolean;
|
||||||
procedure SetAlignment(Value: TAlignment);
|
procedure SetAlignment(Value: TAlignment);
|
||||||
|
procedure SetColor(NewColor: TColor); override;
|
||||||
procedure SetFocusControl(Value: TWinControl);
|
procedure SetFocusControl(Value: TWinControl);
|
||||||
procedure SetLayout(Value: TTextLayout);
|
procedure SetLayout(Value: TTextLayout);
|
||||||
procedure SetShowAccelChar(Value: Boolean);
|
procedure SetShowAccelChar(Value: Boolean);
|
||||||
|
Loading…
Reference in New Issue
Block a user