osx - Change title bar colour - Mac -


i working on mac app. wandering if possible change title bar colour in nswindow? know how remove it, problem removes 3 buttons (close, minimise, resize). want keep 3 buttons rid of bar.

is there anyway this?

enter image description here

yes, it's been done here on so:

how change color of nswindow title bar in osx

they one-link answers bad form here, heck-- you're asking. , works-- i've tried myself.

the couple things notice: code there works on default window of nsapp... need bit of work generalize case of / "any" nswindow. ( take code puts in appdelegate , move own subclass of nswindow or nswindowcontroller. controller. )

also, says subclass nsview "mytitleview", in code, it's called "blacktitlebarview"... pick 1 name, consistent, , it's fine. also, color of title text in drawstring: method, has [nscolor whitecolor]. also, gets fancy gradients, you'll see when run code... if don't need or want that, can replace chunks of code simpler stuff draw single color... might think using fancy stuff anyhow since you're getting free.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -