Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix volume icon on menu bar not centered #767

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions BGMApp/BGMApp/BGMStatusBarItem.mm
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,17 @@ - (void) dealloc {
- (void) initIcons {
// Load the icons.
fermataIcon = [NSImage imageNamed:@"FermataIcon"];
volumeIcon0SoundWaves = [NSImage imageNamed:@"Volume0"];
volumeIcon1SoundWave = [NSImage imageNamed:@"Volume1"];
volumeIcon2SoundWaves = [NSImage imageNamed:@"Volume2"];
volumeIcon3SoundWaves = [NSImage imageNamed:@"Volume3"];
if (@available(macOS 11.0, *)) {
volumeIcon0SoundWaves = [NSImage imageWithSystemSymbolName:@"speaker.fill" accessibilityDescription:nil];
volumeIcon1SoundWave = [NSImage imageWithSystemSymbolName:@"speaker.wave.1.fill" accessibilityDescription:nil];
volumeIcon2SoundWaves = [NSImage imageWithSystemSymbolName:@"speaker.wave.2.fill" accessibilityDescription:nil];
volumeIcon3SoundWaves = [NSImage imageWithSystemSymbolName:@"speaker.wave.3.fill" accessibilityDescription:nil];
} else {
volumeIcon0SoundWaves = [NSImage imageNamed:@"Volume0"];
volumeIcon1SoundWave = [NSImage imageNamed:@"Volume1"];
volumeIcon2SoundWaves = [NSImage imageNamed:@"Volume2"];
volumeIcon3SoundWaves = [NSImage imageNamed:@"Volume3"];
}

// Set the icons' sizes.
NSRect statusBarItemFrame;
Expand Down
Loading