Playback Buttons: Correctly assign tooltips on button changes
This commit is contained in:
parent
4bc3a2a1f3
commit
4567df54b7
1 changed files with 9 additions and 0 deletions
|
@ -65,10 +65,19 @@ static NSString *PlaybackButtonsPlaybackStatusObservationContext = @"PlaybackBut
|
||||||
[self setSegmentCount:4];
|
[self setSegmentCount:4];
|
||||||
[self setImage:[NSImage imageNamed:@"stopTemplate"] forSegment:2];
|
[self setImage:[NSImage imageNamed:@"stopTemplate"] forSegment:2];
|
||||||
[self setImage:[NSImage imageNamed:@"nextTemplate"] forSegment:3];
|
[self setImage:[NSImage imageNamed:@"nextTemplate"] forSegment:3];
|
||||||
|
if (@available(macOS 10.13, *))
|
||||||
|
{
|
||||||
|
[self setToolTip:NSLocalizedString(@"StopButtonTooltip", @"") forSegment:2];
|
||||||
|
[self setToolTip:NSLocalizedString(@"NextButtonTooltip", @"") forSegment:3];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
[self setSegmentCount:3];
|
[self setSegmentCount:3];
|
||||||
[self setImage:[NSImage imageNamed:@"nextTemplate"] forSegment:2];
|
[self setImage:[NSImage imageNamed:@"nextTemplate"] forSegment:2];
|
||||||
|
if (@available(macOS 10.13, *))
|
||||||
|
{
|
||||||
|
[self setToolTip:NSLocalizedString(@"NextButtonTooltip", @"") forSegment:2];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue