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

Allow note text and background color changes. #87

Merged
merged 2 commits into from
Jan 6, 2018

Conversation

jeff-h
Copy link
Contributor

@jeff-h jeff-h commented Jan 3, 2018

As per #63 this PR adds the ability to select the colours used for the note text and the note background.

There are a few issues, hopefully minor:

  • I had to add two colour wells in the prefs for this, rather than using the existing ones provided by the NSFontPanel. Nothing I tried could get the colour info out of the NSFontPanel :(
  • I couldn't turn off the colour wells inside the NSFontPanel — the commented code in my PR does remove them, but the method signature changed in 10.13, apparently, and thus won't work for earlier targets.
  • I haven't applied the selected colours to the markdown preview. I am not sure if you'd want this (I don't use markdown myself). To achieve this, I guess you'd have to inject a line of CSS into the WKWebView setting the font colour and page colour?

glushchenko added a commit that referenced this pull request Jan 5, 2018
@glushchenko glushchenko merged commit 5f53a78 into glushchenko:master Jan 6, 2018
@greendog99
Copy link
Contributor

Love this PR! However, if you set a dark background, the cursor (which is always black) becomes impossible to see. I suspect a good solution is to set the cursor color to be the same as the foreground color?

@jeff-h
Copy link
Contributor Author

jeff-h commented Jan 11, 2018

The precedent set by Apple in TextEdit is that the text cursor is always black regardless of the text background. I found that a little surprising at it's unusable!

My new PR turns the cursor white when the background passes 50% darkness. I think you have to be pretty careful with colour on UI elements or the app will look amateurish so I hope you agree the white works?

@greendog99
Copy link
Contributor

Looks like nvALT uses #474747 for the cursor when the background is dark. Not saying that's the right way to do it, just another comparison. I'm fine with #FFFFFF. I just like being able to see my cursor :-)

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

Successfully merging this pull request may close these issues.

3 participants