mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 04:49:43 +02:00
TPanel: fix csOpaque style inconsistency (it depended on the order of ParentColor/ParentBackground change)
This commit is contained in:
parent
7d00a524a4
commit
96291eb9a5
@ -77,11 +77,8 @@ procedure TCustomPanel.SetParentBackground(const AParentBackground: Boolean);
|
||||
begin
|
||||
if ParentBackground=AParentBackground then
|
||||
Exit;
|
||||
if AParentBackground then
|
||||
ControlStyle := ControlStyle - [csOpaque]
|
||||
else
|
||||
ControlStyle := ControlStyle + [csOpaque];
|
||||
inherited;
|
||||
UpdateParentColorChange;
|
||||
end;
|
||||
|
||||
procedure TCustomPanel.SetShowAccelChar(const Value: Boolean);
|
||||
@ -220,7 +217,7 @@ end;
|
||||
|
||||
procedure TCustomPanel.UpdateParentColorChange;
|
||||
begin
|
||||
if ParentColor then
|
||||
if ParentColor or ParentBackground then
|
||||
ControlStyle := ControlStyle - [csOpaque]
|
||||
else
|
||||
ControlStyle := ControlStyle + [csOpaque];
|
||||
|
Loading…
Reference in New Issue
Block a user