mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 10:19:36 +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
|
||||
inherited Create(TheOwner);
|
||||
Font.OnChange := @FontChange;
|
||||
ControlStyle := [csSetCaption, csOpaque, csClickEvents, csDoubleClicks,
|
||||
csReplicatable];
|
||||
ControlStyle := [csSetCaption, csClickEvents, csDoubleClicks, csReplicatable];
|
||||
Width := 65;
|
||||
Height := 17;
|
||||
FShowAccelChar := True;
|
||||
@ -166,6 +165,17 @@ begin
|
||||
Result := Color = clNone;
|
||||
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
|
||||
Params: None
|
||||
|
@ -1140,6 +1140,7 @@ type
|
||||
function GetAlignment: TAlignment;
|
||||
function GetTransparent: boolean;
|
||||
procedure SetAlignment(Value: TAlignment);
|
||||
procedure SetColor(NewColor: TColor); override;
|
||||
procedure SetFocusControl(Value: TWinControl);
|
||||
procedure SetLayout(Value: TTextLayout);
|
||||
procedure SetShowAccelChar(Value: Boolean);
|
||||
|
Loading…
Reference in New Issue
Block a user