Set a menu bar applications font using an IBAction

237 views Asked by At

Might a method exist to set a menu bar applications titles font also font size using an IBAction, (set font also font size for "title")

statusItem = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSVariableStatusItemLength] retain];

[statusItem setHighlightMode:YES];
[statusItem setTitle:@"title"];
[statusItem setMenu:statusMenu];
1

There are 1 answers

3
Joshua Nozzi On

You can do this for individual menu items. Have you tried NSMenuItem's -setAttributedTitle: method? You can create an NSAttributedString to be any font/color/size you wish, then set the attributed title instead of the regular title.

Frankly, though, you'd better have a good reason to do this beyond "I think it'll look cool" since most users will view that as an annoyance. Especially users with eyesight problems. I'd personally move on to a competing app if such a basic part of the UI was heavily and needlessly customized. Use caution here.