diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2024-12-19 14:50:56 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2024-12-19 14:50:56 +0100 |
| commit | 47eb1128eb930279d0fcf2e836d78372ac7ef5c3 (patch) | |
| tree | cc988080dd1f3d45567227fd4b7f4108d15574f7 /Captura/CapturaApp.swift | |
| parent | 505c1e620497828ffb914e05dd76d9ab124f144a (diff) | |
Diffstat (limited to 'Captura/CapturaApp.swift')
| -rw-r--r-- | Captura/CapturaApp.swift | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/Captura/CapturaApp.swift b/Captura/CapturaApp.swift index 5fe8858..deb1e07 100644 --- a/Captura/CapturaApp.swift +++ b/Captura/CapturaApp.swift @@ -82,7 +82,11 @@ struct CapturaApp: App { statusItem = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength) if let button = statusItem.button { - button.image = NSImage(named: "Idle") + if let image = NSImage(named: "MenuBar/Idle") { + image.isTemplate = true + image.size = NSSize(width: 18, height: 18) + button.image = image + } } statusItem.isVisible = true @@ -457,23 +461,27 @@ struct CapturaApp: App { let image: String = switch captureState { case .idle: - "Idle" + "MenuBar/Idle" case .selectingArea: if recordingWindow?.recordingContentView.box != nil { - "Ready to Record" + "MenuBar/Ready to Record" } else { - "Selecting" + "MenuBar/Selecting" } case .recording: - "Stop Frame 1" + "MenuBar/Stop Frame 1" case .uploading: - "Upload Frame 1" + "MenuBar/Upload Frame 1" case .uploaded: - "OK" + "MenuBar/OK" case .error: - "ERR" + "MenuBar/ERR" } - button.image = NSImage(named: image) + if let image = NSImage(named: image) { + image.isTemplate = true + image.size = NSSize(width: 18, height: 18) + button.image = image + } } } |