Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ teams, distributed work, aviation, astronomy, or anyone who needs a
reliable UTC reference next to the system clock.

## Features
- UTC clock in the menu bar using the system menu bar font (`menuBarFontOfSize`, 14pt) to match the macOS clock.
- UTC clock in the menu bar using the system menu bar font (`menuBarFontOfSize`, 14pt) with monospaced digits, matching the macOS clock.
- Toggle 24-hour/12-hour display, seconds, date, Julian day, and timezone suffix.
- ISO-8601 override for the menubar text plus “Copy as ISO-8601.”
- Copy the current UTC timestamp (using your selected format) to the clipboard.
Expand Down
4 changes: 3 additions & 1 deletion UTCMenuClock/UTCMenuClockAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ - (void)openGithubURL:(id)sender {

- (NSDictionary<NSAttributedStringKey, id> *)statusBarTitleAttributes {
// Menu bar items use menuBarFont (14pt), not systemFontSize (13pt).
// Use monospaced digits so the title doesn't jitter as the seconds tick.
CGFloat size = [NSFont menuBarFontOfSize:0].pointSize;
return @{
NSFontAttributeName: [NSFont menuBarFontOfSize:0],
NSFontAttributeName: [NSFont monospacedDigitSystemFontOfSize:size weight:NSFontWeightRegular],
NSForegroundColorAttributeName: NSColor.labelColor,
};
}
Expand Down
Loading