Skip to content
This repository has been archived by the owner on Mar 5, 2023. It is now read-only.

dark mode for 10.10 #13

Open
Wahlmanj2 opened this issue Dec 18, 2014 · 5 comments
Open

dark mode for 10.10 #13

Wahlmanj2 opened this issue Dec 18, 2014 · 5 comments

Comments

@Wahlmanj2
Copy link

Is there a way to enable dark mode for 10.10 so the icon is more visible when in dark mode?

@shpakovski
Copy link
Collaborator

Hi, any update on this? I can look into this only later, sorry :)

@djtech42
Copy link
Contributor

You can change the image based on the AppleInterfaceStyle key in drawRect:

- (void)drawRect:(NSRect)dirtyRect
{
    // Set up dark mode for icon
    if ([[[NSUserDefaults standardUserDefaults] stringForKey:@"AppleInterfaceStyle"]  isEqual: @"Dark"])
    {
        self.image = [NSImage imageNamed:@"StatusHighlighted"];
    }
    else
    {
        if (self.isHighlighted)
            self.image = [NSImage imageNamed:@"StatusHighlighted"];
        else
            self.image = [NSImage imageNamed:@"Status"];
    }
    // rest of code

@Wahlmanj2
Copy link
Author

Where would you put this at? panel.xib or a .h .m file?

@djtech42
Copy link
Contributor

The drawRect method in the StatusItemView.m file. My code has been added as a pull request in the newest commit.

@Wahlmanj2
Copy link
Author

This is still not right....this is how its supposed to work

https://github.com/nirbhayg/NinjaMode/

https://www.youtube.com/watch?v=jn41sOiQThE

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

No branches or pull requests

3 participants