Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVsevolod Kukol <sevoku@microsoft.com>2021-07-28 14:46:56 +0300
committerVsevolod Kukol <sevoku@microsoft.com>2021-07-28 14:46:56 +0300
commitdbc51caee042b4b822318e115cb9d13c2a184397 (patch)
tree24e4254cc1702f8d498a37bf4527eae89afbb588
parent7203c2c4198f4b29a2fa8c1afc526113941c8370 (diff)
Copy image properties when copying CustomImage
Cocoa sometimes creates a copy of an NSImage to cache it, in that case we also need to copy all custom image properties and settings.
-rw-r--r--Xwt.XamMac/Xwt.Mac/ImageHandler.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Xwt.XamMac/Xwt.Mac/ImageHandler.cs b/Xwt.XamMac/Xwt.Mac/ImageHandler.cs
index 953689fc..a11f86d3 100644
--- a/Xwt.XamMac/Xwt.Mac/ImageHandler.cs
+++ b/Xwt.XamMac/Xwt.Mac/ImageHandler.cs
@@ -361,12 +361,12 @@ namespace Xwt.Mac
public CustomImage Clone ()
{
- return new CustomImage (actx, drawCallback);
+ return new CustomImage(actx, drawCallback) { Image = Image, Size = Size };
}
public override NSObject Copy (NSZone zone)
{
- return new CustomImage (actx, drawCallback);
+ return new CustomImage (actx, drawCallback) { Image = Image, Size = Size };
}
}
}