Skip to content

Commit 4e4d16a

Browse files
committed
Implemented to display a processor name
1 parent 4e20c1d commit 4e4d16a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

Gaufre/AppDelegate.swift

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {
5858
wafersView = NSHostingView(rootView: WafersView(processor: processor) .scaleEffect(0.55))
5959
#endif
6060

61-
let width = coreCount < 30 ? 20 * coreCount + 40 : 20 * coreCount / 2 + 40
62-
let height = coreCount < 30 ? 100 : 160
61+
let width = coreCount < 30 ? 20 * coreCount + 45 : 20 * coreCount / 2 + 45
62+
let height = coreCount < 30 ? 90 : 160
6363

6464
wafersView.frame = NSRect(x: 0, y: 0, width: width, height: height)
6565

@@ -70,6 +70,15 @@ class AppDelegate: NSObject, NSApplicationDelegate {
7070
let mainMenu = NSMenu()
7171
mainMenu.addItem(coreInfoItem)
7272

73+
// Processor name
74+
let processorName: String
75+
#if DEBUG
76+
processorName = "DEBUG"
77+
#else
78+
processorName = MacDeviceHardware.deviceHardware.processorName
79+
#endif
80+
mainMenu.addItem(withTitle: processorName, action: nil, keyEquivalent: "")
81+
7382
// separater
7483
mainMenu.addItem(NSMenuItem.separator())
7584

0 commit comments

Comments
 (0)