File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,15 @@ - (void)setImage:(NSImage*)image {
9393
9494- (void )setAlternateImage : (NSImage *)image {
9595 [[statusItem_ button ] setAlternateImage: image];
96+
97+ // We need to change the button type here because the default button type for
98+ // NSStatusItem, NSStatusBarButton, does not display alternate content when
99+ // clicked. NSButtonTypeMomentaryChange displays its alternate content when
100+ // clicked and returns to its normal content when the user releases it, which
101+ // is the behavior users would expect when clicking a button with an alternate
102+ // image set.
103+ [[statusItem_ button ] setButtonType: NSButtonTypeMomentaryChange];
104+ [self updateDimensions ];
96105}
97106
98107- (void )setIgnoreDoubleClickEvents : (BOOL )ignore {
You can’t perform that action at this time.
0 commit comments