Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

[Themes] Hair cursor color should be something close to white when in dark theme. #8613

Open
RaymondLim opened this issue Jul 31, 2014 · 12 comments

Comments

@RaymondLim
Copy link
Contributor

  1. Switch to dark theme.
  2. Move over the editor window and look at the hair cursor.

Result: You can barely see the hair cursor since it is in a shade of gray or dark color that gets blended into the dark background (even when you hover on white text).

@RaymondLim
Copy link
Contributor Author

This appears to be mac only issue since I'm seeing white cursor with dark theme on Windows.

@RaymondLim
Copy link
Contributor Author

I can reproduce it in vanilla CM demo page. Filed codemirror/codemirror5#2743 and added tracking label.

@RaymondLim
Copy link
Contributor Author

Does anyone know why or whether we introduced the hair cursor in CM? See Marijn's comment

@marcelgerber
Copy link
Contributor

With hair cursor, you mean the crosshair shown while holding down Alt, right?
It was introduced in codemirror/codemirror5#2392, and mightyguava is presumably not an Adobe guy.

Btw, I don't even see that crosshair in Brackets on Win8.1, but only in the CM demo online...

@RaymondLim
Copy link
Contributor Author

No, not the crosshair. I meant text cursor that you see when hovering over an edit field.

@peterflynn
Copy link
Member

The "I beam" cursor that appears when you hover over text was not added by Adobe, or even by CodeMirror. It's a Mac OS standard cursor that appears over all native text areas (and anything else you style with cursor: text, such as CodeMirror's DOM nodes).

I've added some comments to codemirror/codemirror5#2743 and also volunteered us to look into cursor: url() as a workaround, supplying a lighter I beam image when the theme has a dark bg (CC @larz0 in case we need an asset). It sounds like Sublime, TextMate, Mac OS Terminal, and other apps basically use a native custom cursor as a workaround for this already, so this is just doing the CSS equivalent of that same workaround.

@bwlv
Copy link

bwlv commented Sep 24, 2014

@peterflynn did you have any success changing the cursor formats?

@arrbie
Copy link

arrbie commented Jun 2, 2015

We are still waiting for the "I beam" cursor to become visible in dark themes. There is a very pale shadow outline, but that is definitely not enough. We would really like a white "I beam" cursor. Any progress on this?

@peterflynn
Copy link
Member

It looks like this is fixed in OS X 10.10

@arrbie
Copy link

arrbie commented Jun 12, 2015

Yes, it's just beautiful now isn't it. You can almost (but not quite) see it with a magnifying glass and your image-enhancing goggles on.

@peterflynn Really, don't you think we are using the latest software out here – especially before writing comments like this? OS X 10.10 has been around for a year now (actually 10.11 is available now). Have you even checked this with the "Brackets Dark" theme yourself? Did you look at the right thing?

Have a look at my screen photo below. What do you think? If you look really carefully, you will find the i-beam cursor about 30 px above the word "charset". Yeah, that's the one. Problem fixed? Don't think so.

brackets_dark_w_ibeam_cursor

There seems to be a common denominator in the way you solve bugs in the Brackets team. You don't read and test things carefully. You say you do, but you really don't. It's so much easier blaming other products. (Don't shoot me for pointing this out. I'm just stating the facts.)

BTW, the i-beam looks perfect in dark themes in all other Mac applications, including TextMate, BBEdit, Smultron, Atom, Sublime Text etc… So, where do you think the problem lies?

@marcelgerber
Copy link
Contributor

@arrbie Please calm down.

It's not like @peterflynn is wrong just because he doesn't have the same outcome you have. He was able to repro this issue before, so I guess he knows what he's talking about, and he also knows he cannot repro it anymore. He presumed it was the update to OS X 10.10, but of course, there are many other conditions to consider, above all OS settings.

Furthermore, all the other apps you've listed above have, from what I can tell, fixed this with a workaround, so this is apparently not something the OS gives them for free. It's just that neither Chrome nor CodeMirror (the code editor we use, as you might already know), nor Brackets itself did anything about it (yet).

I want to add that this is really a thing the OS can and should do. That's what Windows does, and it works perfectly well.

@TomMalbran
Copy link
Contributor

Btw I did tested it in OSX 10.10.3 and I can see a clear white border around the I beam, and not just a shadow. It might not be as clear as a white one, but you can see quite well. And also is the same cursor I see in Atom, which does not change it to a white cursor like sublime does.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants