Skip to content

Commit

Permalink
cocoaui: use smaller size in track context menu and volumebar menu
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksiy-Yakovenko committed Nov 14, 2024
1 parent 8096851 commit c10d5c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/cocoaui/MainWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,8 @@ - (void)menuNeedsUpdate:(NSMenu *)menu {
char scale[10];
deadbeef->conf_get_str ("playback.volume.scale", "dB", scale, sizeof(scale));

menu.font = [NSFont systemFontOfSize:NSFont.smallSystemFontSize];

self.volumeDbScaleItem.state = !strcmp (scale, "dB") ? NSControlStateValueOn : NSControlStateValueOff;
self.volumeLinearScaleItem.state = !strcmp (scale, "linear") ? NSControlStateValueOn : NSControlStateValueOff;
self.volumeCubicScaleItem.state = !strcmp (scale, "cubic") ? NSControlStateValueOn : NSControlStateValueOff;
Expand Down
3 changes: 3 additions & 0 deletions plugins/cocoaui/Utility/TrackContextMenu.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ - (instancetype)initWithCoder:(NSCoder *)coder {
- (instancetype)initWithView:(NSView *)view {
self = [super initWithTitle:@""];
self.view = view;
self.font = [NSFont systemFontOfSize:NSFont.smallSystemFontSize];
return self;
}

Expand Down Expand Up @@ -112,6 +113,8 @@ - (void)update:(ddb_playlist_t *)playlist actionContext:(ddb_action_context_t)ac
self.reloadMetadataItem.target = self;

NSMenu *rgMenu = [[NSMenu alloc] initWithTitle:@"ReplayGain"];
rgMenu.font = [NSFont systemFontOfSize:NSFont.smallSystemFontSize];

rgMenu.autoenablesItems = NO;

self.rgScanPerFileItem = [rgMenu addItemWithTitle:@"Scan Per-file Track Gain" action:@selector(rgScanTracks:) keyEquivalent:@""];
Expand Down

0 comments on commit c10d5c2

Please sign in to comment.