Giter VIP home page Giter VIP logo

menubartest's Introduction

What's all this, then?

This is a super simple skeleton project demonstrating:

  1. How to make a Mac OS X menubar app, with a status bar item and a popover.
  2. How to make the menu bar item and popover look decent with both light and dark themes in Yosemite and above (hint: use template images and system colors; see my answer to [this stackoverflow question] (http://stackoverflow.com/questions/30901120/how-to-make-a-menubar-app-look-good-with-dark-mode-in-yosemite/30908871?noredirect=1#comment49889381_30908871)).

Why?

Because someone was asking. If you find it useful, awesome.

How's it work?

AppDelegate adds an NSStatusItem to the menu bar, and sets its view to an instance of StatusItemView, which basically just has an NSImageView to draw something in the menu bar. StatusItemView also has a target/action, which it sends when it's clicked on.

AppDelegate also instantiates a MainViewController, which shows itself in aN NSPopover.

All this stuff is basically a very cut down version of the UI used for one of my apps, TaskLog.

Who's responsible for this?

I'm Zacharias Pasternack, lead developer for Fat Apps, LLC. You can check out my blog, or follow me on Twitter or App.net.

Can I use this code?

You bet. Do whatever you want with it. If you find issues, please let me know. If you make it better, please let me know.

License

The code is available under a Modified BSD License. See the LICENSE file for more info.

menubartest's People

Contributors

zpasternack avatar

Watchers

Carabineiro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.