-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Dark mode support #532
Dark mode support #532
Conversation
6362108
to
294aa54
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks amazing! Thanks for the tremendous effort by everyone and for pulling this all together. The changes all seem pretty safe with a few comments, but maybe I'm just misunderstanding the NSImage logic. Is this an issue for backwards compatibility that we have to conditionally select the dark/light image in code rather than let the asset catalogs handle this for us?
That is correct. |
Will also investigate Travis in a sec… |
294aa54
to
5071ffa
Compare
Added commentary around |
Seemed like @swisspol was fine with bumping to 10.10 in the original issue. If it would make the commit cleaner to simply support 10.10 and higher I think it would be worth bumping. Alternatively we could bump later, just might be easier to cleanup beforehand. |
I will prepare a PR for bumping and then rebase this onto that once merged, or will have it clean up bits of this it can; whichever comes first. |
5071ffa
to
3b5ec39
Compare
OK, it totally is much simpler. I'm getting CI to check on this branch then posting a PR for the deployment change. |
3b5ec39
to
be1f004
Compare
8f9e2e3
to
a82db23
Compare
a606dbf
to
0321aaa
Compare
More closely based on the system colors like systemRedColor. Adds orange instead of using two variants of green. Uses more saturated colors in Dark Mode
For some reason the label backgrounds did not match the window background in dark mode. As I understand it, Mojave no longer uses sub-pixel antialiasing so this workaround is no longer needed.
3f3a589
to
660aa75
Compare
Fix bad merge from master
This is probably my doing, the map has defaulted to
I am pretty strongly against spending time on adding new code for that until it is requested, but you're welcome to do whatever you want. Users that this would hypothetically "break" will have already explicitly chosen Dark Mode at the system level. The documentation/HIG/WWDC sessions pretty recommend against custom appearance toggles unless the app is specifically media-focused; otherwise, it is more important to respect the users' choices. Meanwhile, GitUp has been blindingly, searingly white for people who have made that choice for over a year, and so has been certainly "broken" in the same way. |
I was referring to functional behavior. For visuals, if things evolve spatially or in the used colors, I have no problem. |
@swisspol Good to know 🙂. @zwaldowski let me know when you're done testing out an alternate dark background color and we'll merge this in. |
Edit: This is recommended by the SDK, it's the same color/texture used by all scrolling content. The list of things that use it would be too many to count. In fact, it is the identical counterpart to the hard-coded Xcode is not a great point of comparison because it involves custom theming. That said, the "sharpness" might be from the contrast with the branch colors? Ours in this branch are pretty much lifted from their counterparts in Calendar, and those are definitely on the neon side of things. We can definitely evolve those; doing so would be trivial and could happen whenever. In the spirit of moving things forward, if there are still concerns we could open an issue for it and I could experiment with it later this week. |
For me it's the red/green/black in diff views I find a bit jarring, but I'd have to play around with some colors to see what bothers me about it. Let's try it out and see what we think! |
* Add a helper for looking up the GitUpKit bundle * Add polyfills for NSAppearance * Enable dark mode * Draw consistent grid for diffs with line number gutters in dark mode * Remove map status label backgrounds on Mojave For some reason the label backgrounds did not match the window background in dark mode. As I understand it, Mojave no longer uses sub-pixel antialiasing so this workaround is no longer needed. * Add a namespace for defining semantic colors * Allow window-tinted background in graph view * Support Dark Mode in modal views * Fix dark-on-dark text in selected cells in dark mode * Don't fill the background color for conflict/empty rows in diff views * Support Dark Mode in welcome window * Support Dark Mode in main window toolbar * Support Dark Mode in main window status bar * Support Dark Mode in window tip overlays * Support Dark Mode in map view * Support Dark Mode in diff views * Support Dark Mode in commit editors * Support Dark Mode in commit viewers * Support Dark Mode in commit lists * Improve branch colors More closely based on the system colors like systemRedColor. Adds orange instead of using two variants of green. Uses more saturated colors in Dark Mode * Support Dark Mode in config editor * Update Document.m Fix bad merge from master
Completes #463.
TODO
controlBackgroundColor
.This PR brings the dark mode implementation from @saagarjha and @douglashill into upstream.
In addition to their (awesome) work, this PR:
Review Notes
Due to parts of the app being unusable when dark mode isn’t supported in that screen, this PR isn’t as small and granular as would be ideal. However, the diff was specifically adjusted to limit unnecessary churn, such as avoiding the automatic rewriting of xibs. I failed to identify good points to break up what remains; if you find chunks you’re rather me split out to review separately, I’d be happy to do so (through the magic of GitUp!).
Screenshots
10.15 (Dark)
10.15 (Light)
10.14 (Dark)
10.14 (Light)
10.13 (Light)
10.12 (Light)
10.11
10.10
And Finally…
I AGREE TO THE GITUP CONTRIBUTOR LICENSE AGREEMENT