Popup icon indicating copy to clipboard operation
Popup copied to clipboard

dark mode for 10.10

Open Wahlmanj2 opened this issue 10 years ago • 5 comments

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

Wahlmanj2 avatar Dec 18 '14 13:12 Wahlmanj2

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

shpakovski avatar Dec 19 '14 13:12 shpakovski

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

djtech42 avatar Dec 21 '14 06:12 djtech42

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

Wahlmanj2 avatar Dec 30 '14 08:12 Wahlmanj2

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

djtech42 avatar Dec 31 '14 02:12 djtech42

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

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

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

Wahlmanj2 avatar Dec 31 '14 08:12 Wahlmanj2