mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 11:01:20 +02:00
lcl: call HandleNeeded before checking of maskhandle when adding bitmap to the imagelist (fixes #0011692)
git-svn-id: trunk@16011 -
This commit is contained in:
parent
5994265add
commit
c157756168
@ -161,7 +161,7 @@ type
|
||||
class function GetControlClassDefaultSize: TPoint; override;
|
||||
public
|
||||
constructor Create(TheOwner: TComponent); override;
|
||||
destructor Destroy; Override;
|
||||
destructor Destroy; override;
|
||||
procedure Click; override;
|
||||
public
|
||||
property Glyph: TBitmap read GetGlyph write SetGlyph stored IsGlyphStored;
|
||||
|
@ -26,7 +26,7 @@ type
|
||||
procedure SetTransparent(AValue: Boolean); override;
|
||||
public
|
||||
procedure Assign(ASource: TPersistent); override;
|
||||
constructor Create(AOwner: TButtonGlyph);
|
||||
constructor Create(AOwner: TButtonGlyph); reintroduce;
|
||||
end;
|
||||
|
||||
procedure TGlyphBitmap.Assign(ASource: TPersistent);
|
||||
|
@ -635,10 +635,12 @@ end;
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomImageList.Insert(AIndex: Integer; AImage, AMask: TCustomBitmap);
|
||||
var
|
||||
msk: THandle;
|
||||
img, msk: THandle;
|
||||
begin
|
||||
if AImage = nil then Exit;
|
||||
|
||||
// Paul: dont optimize. We need to call HandleNeeded before checking of maskhandle
|
||||
img := AImage.Handle;
|
||||
if AMask = nil
|
||||
then begin
|
||||
if AImage.MaskHandleAllocated
|
||||
@ -647,7 +649,7 @@ begin
|
||||
end
|
||||
else msk := AMask.Handle;
|
||||
|
||||
InternalInsert(AIndex, AImage.Handle, msk, AImage.Width, AImage.Height);
|
||||
InternalInsert(AIndex, img, msk, AImage.Width, AImage.Height);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
@ -811,7 +811,7 @@ end;
|
||||
Returns: nothing
|
||||
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomSpeedButton.SetTransparent(const AValue : boolean);
|
||||
procedure TCustomSpeedButton.SetTransparent(const AValue: boolean);
|
||||
const
|
||||
MODE: array[Boolean] of TGlyphTransparencyMode = (gtmOpaque, gtmTransparent);
|
||||
begin
|
||||
@ -857,7 +857,8 @@ procedure TCustomSpeedButton.Loaded;
|
||||
begin
|
||||
inherited Loaded;
|
||||
UpdateExclusive;
|
||||
if FDownLoaded then SetDown(FDownLoaded);
|
||||
if FDownLoaded then
|
||||
SetDown(FDownLoaded);
|
||||
end;
|
||||
|
||||
procedure TCustomSpeedButton.LoadGlyphFromLazarusResource(const AName: String);
|
||||
|
Loading…
Reference in New Issue
Block a user