Skip to content

Commit

Permalink
Merge pull request #767 from 7Backwards/Fix-volume-icon-on-menu-bar-n…
Browse files Browse the repository at this point in the history
…ot-centered

Fix volume icon on menu bar not centered
  • Loading branch information
kyleneideck authored Sep 9, 2024
2 parents 610f15c + a8f4ace commit 9058e3c
Showing 1 changed file with 11 additions and 4 deletions.
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

0 comments on commit 9058e3c

Please sign in to comment.