-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
One of the SVG options that is available via GetIt in the more recent versions of Delphi contains the TSVGIconImageList. Using this list for SVG images mostly works, however the disabled drawing is broken, which is extremely visible if you use a dark theme. I made the following changes to TB2Common in the SpIsVirtualImageList procedure. The code change is towards the bottom of this procedure. I believe the patch file would need to be updated to include this change.
// special case for TSVGIconImageList (also uses RTTI)
else
if (ImageList.ClassName = 'TSVGIconImageList') then begin
if enabled then
ImageList.Draw(ACanvas, ARect.Left, ARect.Top, ImageIndex)
else
begin
RttiC := TRttiContext.Create;
// Paint disabled
RTTIC.GetType(ImageList.ClassType).GetMethod('PaintTo').Invoke(
ImageList,[ACanvas,ImageIndex,ARect.Left,ARect.Top,ARect.Width,aRect.Height,False]);
end;
end
else
// end special case
{$IFEND}
// For older versions of Delphi
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels