Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[scide] Change default theme #4025

Merged
merged 8 commits into from
Aug 31, 2018
Merged

Conversation

nhthn
Copy link
Contributor

@nhthn nhthn commented Aug 28, 2018

Purpose and Motivation

the default IDE theme is quite ugly. providing a professional looking default theme improves first impressions of SC. also if SC educators don't have to look at #ffffff white backgrounds when helping students, that's a plus.

this PR supplies a new default theme. here's what it looks like with some SynthDef code:

untitled

here is the full gamut of code colors and the syntax elements they correspond to:

untitled

i wanted to keep it a light theme to avoid making the change too radical from 3.9. the colors are lifted from Kary Pro Color, but i switched them around considerably to keep an attractive balance of hues in typical SC code.

the background is light gray and not white like the old theme. however, it is still quite high contrast. it looks especially great with a beefy font choice like Source Code Pro Medium (above) or Meslo LG.

i avoided bold text. some themes can pull it off, but i think it looks pretty unprofessional in syntax highlighting. the most popular editor themes use bold very sparingly.

too many inconsistent colors become hard to tweak, and just don't look very good. i reused some colors: ~environmentVars / _Primitive (both of which are very unlikely to occur in adjacent code), and numerics/characters/builtins (all of which are "atomic" literals).

old theme is renamed to "classic."

Types of changes

cosmetic change

Checklist

  • All tests are passing
  • If necessary, new tests were created to address changes in PR, and tests are passing
  • Updated documentation, if necessary
  • This PR is ready for review

Remaining Work

right now the help browser still has #fffff background, so it looks off from the default theme. we should change it, but i will leave that for another PR.

@nhthn nhthn added this to the 3.10 milestone Aug 28, 2018
@mossheim
Copy link
Contributor

The only comment I will make about this is that I would expect "atomic" literals, i.e. numbers, characters, and true/false/nil/inf, to be all the same color. At the very least, numbers and characters because of how often you transform between them.

Copy link
Contributor

@patrickdupuis patrickdupuis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been using the new default theme all day so far and I'm really loving it!

addToTheme("evaluatedCode", background, orange);
addToTheme("whitespace", background);
addToTheme("keyword", red);
addToTheme("built-in", yellow);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see @brianlheim's point. "built-in" is the only use of yellow. It might be best to make it purple. "char" could also be purple.

Chars and builtins are now purple along with numeric literals. Yellow is discarded. It was hard to read anyway.
@nhthn
Copy link
Contributor Author

nhthn commented Aug 28, 2018

thanks for the feedback. i've decided to discard yellow (which was hard to read anyway). the first post has been updated.

in the future, i'd love to expand ScIDE::ScLexer so it can parse a wider variety of SC tokens. i actually have a branch for separate syntax highlighting for binary operators, but it's a "10% more beautiful" thing, and not very critical for these 3.10 makeovers.

@miczac
Copy link
Contributor

miczac commented Aug 29, 2018

Bright backgrounds are not my cup of tea, but this one is a real improvement!
May I suggest to change Cyan (i.e. for Class) to #3478bc to give it a tad more edge?
And, is it deliberate to hide matching brackets? If not, may I suggest #e7efea as background?
As in green-ish for "ok" and opposing the hot red mismatched brackets.

@nhthn
Copy link
Contributor Author

nhthn commented Aug 29, 2018

And, is it deliberate to hide matching brackets? If not, may I suggest #e7efea as background?
As in green-ish for "ok" and opposing the hot red mismatched brackets.

i set the parentheses to appear bold, but unfortunately not all fonts have bold. i also tried underline (like in sublime text) but the qt underline has some garish-looking results when it intersects with characters or the cursor, so not great either. so, back to a subtle background color.

i wouldn't use green here, btw. a light shade of green looks pretty gaudy, a dark shade of green will create confusion for users with red/green colorblindness.

May I suggest to change Cyan (i.e. for Class) to #3478bc to give it a tad more edge?

yeah that's a good idea, thanks. i also nudged the string color a little to the purple side so it's more easily distinguishable from classes.

@miczac
Copy link
Contributor

miczac commented Aug 29, 2018 via email

@patrickdupuis
Copy link
Contributor

Are we good to go?

@mossheim
Copy link
Contributor

I am satisfied with this! Thanks @snappizz

@nhthn
Copy link
Contributor Author

nhthn commented Aug 31, 2018

i've made the background for currentLine/matching parentheses a little less subtle per @miczac's request. after CI passes, this should be good to go.

thanks all for the feedback, there was much less resistance to this than i expected :)

@patrickdupuis patrickdupuis merged commit e539c88 into supercollider:3.10 Aug 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants