Bug 5390 - [mac] mouse caret cursor hardly visible with dark themes, vanishes completely sometimes
Summary: [mac] mouse caret cursor hardly visible with dark themes, vanishes completely...
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 7.1 (d15-3)
Hardware: PC Mac OS
: Low enhancement
Target Milestone: Future Cycle (TBD)
Assignee: Cody Russell
Depends on:
Reported: 2012-05-29 07:21 UTC by Marek Habersack
Modified: 2017-07-17 18:17 UTC (History)
6 users (show)

Tags: papercut
Is this bug a regression?: ---
Last known good build:

Poor Contrast (14.12 KB, image/png)
2017-07-17 18:15 UTC, Joel Martinez

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 5390 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Marek Habersack 2012-05-29 07:21:49 UTC
When using MD on a Mac outside or in a very bright environment the default mouse caret cursor is poorly visible on the dark background in the text editor. Sometimes it vanishes completely and mouse has to be wiggled quite a lot to make it re-appear (this seems to be an OSX issue though).
It would be nice if MD replaced the default OSX caret mouse cursor when using dark themes with something more contrasting with the dark background.
Comment 1 Mike Krüger 2012-05-29 07:38:49 UTC
Maybe something for the UI refresh ?
Comment 2 Rob DeRosa 2016-05-03 15:42:09 UTC
Sublime inverts the cursor color when a dark theme is applied. Is it possible to do this for XS as well? There are no options to manually change the cursor in OSX so this feature would be really great to have.
Comment 3 Cody Russell 2016-05-03 22:18:26 UTC
We may not need to invert the cursor, because that may be difficult to do right across gtk and Cocoa. Maybe simply having a better cursor would work. Right now we have like 1px white and 1px black shadow, or something like that. Perhaps we can have a black cursor with a 1px white border on all sides of it, just like the arrow cursor. That would make it visible on both dark and light surfaces.
Comment 4 Vaclav Vancura 2016-05-04 08:12:06 UTC
Sounds good to me. Do you know where's the code so I can play with it?
Comment 5 Vsevolod Kukol 2016-05-04 11:57:40 UTC
So, we have added a custom cursor implementation here: https://github.com/mono/monodevelop/commits/add-custom-mac-editor-cursor (it simply replaces the TextArea cursor with our own Pixbuf).
But there seems to be an issue with retina scaling. gdk_display_get_default_cursor_size returns 32px, but it should be still the default 16px and Gdk should take care of the scaling internally as it does for any other pixmap. I've tried to pass the large Xwt image (WithSize (16 * scale)) but it results in a upscaled cursor bitmap, where all pixels are 2x2. The Xwt image includes 16@1x and 16@2x images.

@Cody: can you help with the retina patches?
Comment 7 Joel Martinez 2017-07-17 18:15:26 UTC
Created attachment 23605 [details]
Poor Contrast

According to this contrast app (https://usecontrast.com/), the cursor still has poor contrast (score of 1.45 out of 10 :/ )