From c10d5c22f2dd2d9fa3aad9ef35304678d6462039 Mon Sep 17 00:00:00 2001 From: Oleksiy Yakovenko Date: Thu, 14 Nov 2024 21:14:09 +0100 Subject: [PATCH] cocoaui: use smaller size in track context menu and volumebar menu --- plugins/cocoaui/MainWindowController.m | 2 ++ plugins/cocoaui/Utility/TrackContextMenu.m | 3 +++ 2 files changed, 5 insertions(+) diff --git a/plugins/cocoaui/MainWindowController.m b/plugins/cocoaui/MainWindowController.m index c7eaa2a7be..8175718228 100644 --- a/plugins/cocoaui/MainWindowController.m +++ b/plugins/cocoaui/MainWindowController.m @@ -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; diff --git a/plugins/cocoaui/Utility/TrackContextMenu.m b/plugins/cocoaui/Utility/TrackContextMenu.m index 8da59b67ff..5386fe975b 100644 --- a/plugins/cocoaui/Utility/TrackContextMenu.m +++ b/plugins/cocoaui/Utility/TrackContextMenu.m @@ -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; } @@ -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:@""];