diff options
author | Sandy Armstrong <sandy@xamarin.com> | 2022-05-12 22:39:33 +0300 |
---|---|---|
committer | Sandy Armstrong <sandy@xamarin.com> | 2022-05-19 19:49:33 +0300 |
commit | 538ef0ac98b3ec3889512d77cf60e12a829c69bf (patch) | |
tree | d221d46faff89dfe5db9c3ce9e7159f890c702c5 | |
parent | 6aa4aec00e861af027270e65eaf3c470f6788984 (diff) |
Mac: Drop hand cursor support for link text in RichTextViewdev/sandy/macos-rc3
This needs a little extra time to make work correctly now that GetRects
is not bound for NSTextView.
I cannot find any RichTextView in VSMac that uses anything but plain
text so this should not cause any regression there.
-rw-r--r-- | Xwt.XamMac/Xwt.Mac/RichTextViewBackend.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Xwt.XamMac/Xwt.Mac/RichTextViewBackend.cs b/Xwt.XamMac/Xwt.Mac/RichTextViewBackend.cs index ceed7af9..2c010644 100644 --- a/Xwt.XamMac/Xwt.Mac/RichTextViewBackend.cs +++ b/Xwt.XamMac/Xwt.Mac/RichTextViewBackend.cs @@ -326,9 +326,13 @@ namespace Xwt.Mac TextStorage.EnumerateAttributes (new NSRange (0, TextStorage.Length), NSAttributedStringEnumeration.None, (NSDictionary attrs, NSRange range, ref bool stop) => { stop = false; if (attrs.ContainsKey (NSStringAttributeKey.Link)) { - var rects = GetRects (range); - for (nuint i = 0; i < rects.Count; i++) - AddCursorRect (rects.GetItem<NSValue> (i).CGRectValue, NSCursor.PointingHandCursor); + // TODO: Reimplement this to get proper mouse cursor for link text. + // GetRects comes from NSTextFinderClient, which NSTextView does not officially implement + // so it is no longer bound. However, NSTextView does unofficially support this protocol + // so this could be fixed by manually sending the getRects: message. + // var rects = GetRects (range); + // for (nuint i = 0; i < rects.Count; i++) + // AddCursorRect (rects.GetItem<NSValue> (i).CGRectValue, NSCursor.PointingHandCursor); } }); } |