mmattozzi / cocoa-rest-client

A free, native Apple macOS app for testing HTTP/REST endpoints
http://mmattozzi.github.io/cocoa-rest-client/
Other
2.35k stars 206 forks source link

Dark mode #160

Closed cemck closed 3 years ago

cemck commented 3 years ago

changed some colors to make it compatible with dark mode

mmattozzi commented 3 years ago

Thanks for the contribution! This is exciting. As you may have noticed, it has been a while since I've built a release of this app so I need to get myself organized to do so once I merge this in. I had been planning to release a unified binary with M1 chip support. Have you also tested this in Big Sur?

mmattozzi commented 3 years ago

Sorry for the delayed response... looking through this now. It looks like the background gradient behind the URL box and method picker has disappeared and is just gray (when viewed outside of DarkMode at least). Was this intentional? It looks a little blah or incomplete that way. I could see that gradient not working well in DarkMode, but I kind of liked it in the regular view.

mmattozzi commented 3 years ago

Playing around with this a bit more, I tried also making the overall main window View into an NSVisualEffectView and then experiment with some background transparency and material options. There might be a pleasing combo somewhere in here. This is probably one of the better arrangements I came up with:

    [self.mainWindowView setBlendingMode:NSVisualEffectBlendingModeBehindWindow];
    [self.mainWindowView setState:NSVisualEffectStateActive];
    [self.mainWindowView setMaterial:NSVisualEffectMaterialLight];
    [self.urlBoxView setBlendingMode:NSVisualEffectBlendingModeBehindWindow];
    [self.urlBoxView setState:NSVisualEffectStateActive];
    [self.urlBoxView setMaterial:NSVisualEffectMaterialMediumLight];

I think to make this app even more conformant to the way Apple thinks an app should work, it might make sense to turn the top view into an NSToolBar and move it out of the main window view so that it can have the close/minimize/maximize buttons and I can ditch the title bar. That was proving a little precarious in InterfaceBuilder. I'll be playing around with a few things unless you have any revelations. Maybe Mojave and Big Sur are just very boring UIs and I'm trying to swim upstream here.

cemck commented 3 years ago

No problem, feel free to customize my changes as you like to. An NSVisualEffectView like in your example would be a great addition