title: Custom View in NSMenuItem does not highlight correctly
body: <p>I try to use a custom view for a <code>NSMenuitem</code>, which works. Unfortunately, I have some difficulties with the <em>highlighting</em> (mouseover). I already followed the instructions in other threads to implement <code>drawRect:</code> in my <code>NSView</code> subclass to do the blue <em>highlighting</em> manually. This seems to work, but the highlighting color is not correct. It appears too dark compared to regular menu items and interestingly the <code>subviews</code> of my custom view use the correct <em>highlighting</em> color (see screenshot).
  Any ideas on how to fix this issue?</p>
  
  <p>My current <code>drawRect:</code> method in the <code>NSView</code> subclass looks like this:</p>
  
  <pre><code>- (void)drawRect:(NSRect)dirtyRect
  {
      [super drawRect:dirtyRect];
  
      BOOL isHighlighted = [[self enclosingMenuItem] isHighlighted];
      if (isHighlighted)
      {
          [[NSColor selectedMenuItemColor] setFill];
          NSRectFill(dirtyRect);
  
          [self.profileNameView setTextColor:[NSColor whiteColor]];
          [self.securedIPView setTextColor:[NSColor whiteColor]];
          [self.separatorView setTextColor:[NSColor whiteColor]];
          [self.connectionTimeView setTextColor:[NSColor whiteColor]];
      }
      else
      {
          [self.profileNameView setTextColor:[NSColor controlTextColor]];
          [self.securedIPView setTextColor:[NSColor disabledControlTextColor]];
          [self.separatorView setTextColor:[NSColor disabledControlTextColor]];
          [self.connectionTimeView setTextColor:[NSColor disabledControlTextColor]];
      }
  }
  </code></pre>
  
  <p>The resulting highlighting looks like:</p>
  
  <p><img src="https://i.stack.imgur.com/YxBkF.png" alt="enter image description here"></p>