You've already forked lazarus-ccr
* Fixed transparency in System* check images
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@206 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -3309,8 +3309,6 @@ function TreeFromNode(Node: PVirtualNode): TBaseVirtualTree;
|
|||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{.$R VirtualTrees.res}
|
|
||||||
|
|
||||||
uses
|
uses
|
||||||
{Consts,} Math,
|
{Consts,} Math,
|
||||||
{$ifdef EnableOLE}
|
{$ifdef EnableOLE}
|
||||||
@ -4702,13 +4700,13 @@ var
|
|||||||
OffsetY := (IL.Height - DarkCheckImages.Height) div 2;
|
OffsetY := (IL.Height - DarkCheckImages.Height) div 2;
|
||||||
for I := 21 to 24 do
|
for I := 21 to 24 do
|
||||||
begin
|
begin
|
||||||
BM.Canvas.Brush.Color := MaskColor;
|
//BM.Canvas.Brush.Color := MaskColor;
|
||||||
BM.Canvas.FillRect(Rect(0, 0, BM.Width, BM.Height));
|
BM.Canvas.FillRect(Rect(0, 0, BM.Width, BM.Height));
|
||||||
if Flat then
|
if Flat then
|
||||||
FlatImages.Draw(BM.Canvas, OffsetX, OffsetY, I)
|
FlatImages.Draw(BM.Canvas, OffsetX, OffsetY, I)
|
||||||
else
|
else
|
||||||
DarkCheckImages.Draw(BM.Canvas, OffsetX, OffsetY, I);
|
DarkCheckImages.Draw(BM.Canvas, OffsetX, OffsetY, I);
|
||||||
//IL.AddMasked(BM, MaskColor);
|
BM.MaskHandle := CreateBitmapMask(BM.Canvas.Handle, BM.Width, BM.Height, MaskColor);
|
||||||
IL.AddCopy(BM,nil);
|
IL.AddCopy(BM,nil);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -4722,7 +4720,7 @@ var
|
|||||||
ButtonType: Cardinal;
|
ButtonType: Cardinal;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
BM.Canvas.Brush.Color := MaskColor;
|
//BM.Canvas.Brush.Color := MaskColor;
|
||||||
BM.Canvas.FillRect(Rect(0, 0, BM.Width, BM.Height));
|
BM.Canvas.FillRect(Rect(0, 0, BM.Width, BM.Height));
|
||||||
if Index < 8 then
|
if Index < 8 then
|
||||||
ButtonType := DFCS_BUTTONRADIO
|
ButtonType := DFCS_BUTTONRADIO
|
||||||
@ -4747,8 +4745,8 @@ var
|
|||||||
ButtonState := ButtonState or DFCS_FLAT;
|
ButtonState := ButtonState or DFCS_FLAT;
|
||||||
//lcl has difference to windows
|
//lcl has difference to windows
|
||||||
DelphiCompat.DrawFrameControl(BM.Canvas.Handle, Rect(1, 2, BM.Width - 2, BM.Height - 1), DFC_BUTTON, ButtonType or ButtonState);
|
DelphiCompat.DrawFrameControl(BM.Canvas.Handle, Rect(1, 2, BM.Width - 2, BM.Height - 1), DFC_BUTTON, ButtonType or ButtonState);
|
||||||
|
BM.MaskHandle := CreateBitmapMask(BM.Canvas.Handle, BM.Width, BM.Height, MaskColor);
|
||||||
IL.AddCopy(BM,nil);
|
IL.AddCopy(BM,nil);
|
||||||
//IL.AddMasked(BM, MaskColor);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//--------------- end local functions ---------------------------------------
|
//--------------- end local functions ---------------------------------------
|
||||||
@ -4767,11 +4765,6 @@ begin
|
|||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
IL := TImageList.CreateSize(Width, Height);
|
IL := TImageList.CreateSize(Width, Height);
|
||||||
//with IL do
|
|
||||||
// Handle := ImageList_Create(Width, Height, Flags, 0, AllocBy);
|
|
||||||
IL.Masked := True;
|
|
||||||
//todo: see why compiler complain here
|
|
||||||
//IL.BkColor := clWhite;
|
|
||||||
|
|
||||||
// Create a temporary bitmap, which holds the intermediate images.
|
// Create a temporary bitmap, which holds the intermediate images.
|
||||||
BM := TBitmap.Create;
|
BM := TBitmap.Create;
|
||||||
@ -4780,9 +4773,9 @@ begin
|
|||||||
BM.Width := IL.Width;
|
BM.Width := IL.Width;
|
||||||
BM.Height := IL.Height;
|
BM.Height := IL.Height;
|
||||||
BM.Canvas.Brush.Color := MaskColor;
|
BM.Canvas.Brush.Color := MaskColor;
|
||||||
BM.Canvas.Brush.Style := bsSolid;
|
//BM.Canvas.Brush.Style := bsSolid;
|
||||||
BM.Canvas.FillRect(Rect(0, 0, BM.Width, BM.Height));
|
BM.Canvas.FillRect(Rect(0, 0, BM.Width, BM.Height));
|
||||||
//IL.AddMasked(BM, MaskColor);
|
BM.MaskHandle := CreateBitmapMask(BM.Canvas.Handle, BM.Width, BM.Height, MaskColor);
|
||||||
IL.AddCopy(BM,nil);
|
IL.AddCopy(BM,nil);
|
||||||
|
|
||||||
// Add the 20 system checkbox and radiobutton images.
|
// Add the 20 system checkbox and radiobutton images.
|
||||||
|
Reference in New Issue
Block a user