adobe / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
33.26k stars 7.64k forks source link

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

Open RaymondLim opened 10 years ago

RaymondLim commented 10 years ago
  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 commented 10 years ago

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

RaymondLim commented 10 years ago

I can reproduce it in vanilla CM demo page. Filed https://github.com/marijnh/CodeMirror/issues/2743 and added tracking label.

RaymondLim commented 10 years ago

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

marcelgerber commented 10 years ago

With hair cursor, you mean the crosshair shown while holding down Alt, right? It was introduced in marijnh/CodeMirror#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 commented 10 years ago

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

peterflynn commented 10 years ago

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 marijnh/CodeMirror#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 commented 9 years ago

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

arrbie commented 9 years ago

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 commented 9 years ago

It looks like this is fixed in OS X 10.10

arrbie commented 9 years ago

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 commented 9 years ago

@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 commented 9 years ago

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.