|
@@ -179,10 +179,6 @@ begin
|
|
if AutoSize and (Bitmap.Width > 0) and (Bitmap.Height > 0) then
|
|
if AutoSize and (Bitmap.Width > 0) and (Bitmap.Height > 0) then
|
|
FControl.SetBounds(FControl.Left, FControl.Top, Bitmap.Width + AutoSizeExtraWidth,
|
|
FControl.SetBounds(FControl.Left, FControl.Top, Bitmap.Width + AutoSizeExtraWidth,
|
|
Bitmap.Height + AutoSizeExtraHeight);
|
|
Bitmap.Height + AutoSizeExtraHeight);
|
|
- if (Bitmap.Width >= FControl.Width) and (Bitmap.Height >= FControl.Height) then
|
|
|
|
- FControl.ControlStyle := FControl.ControlStyle + [csOpaque] - [csParentBackground]
|
|
|
|
- else
|
|
|
|
- FControl.ControlStyle := FControl.ControlStyle - [csOpaque] + [csParentBackground];
|
|
|
|
FControl.Invalidate;
|
|
FControl.Invalidate;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -318,7 +314,7 @@ end;
|
|
constructor TBitmapImage.Create(AOwner: TComponent);
|
|
constructor TBitmapImage.Create(AOwner: TComponent);
|
|
begin
|
|
begin
|
|
inherited;
|
|
inherited;
|
|
- ControlStyle := ControlStyle + [csReplicatable];
|
|
|
|
|
|
+ ControlStyle := ControlStyle + [csParentBackground, csReplicatable];
|
|
FImpl.Init(Self);
|
|
FImpl.Init(Self);
|
|
FImpl.BackColor := clBtnFace;
|
|
FImpl.BackColor := clBtnFace;
|
|
Width := 105;
|
|
Width := 105;
|