Skip to content

Commit

Permalink
Use hourglass image rather than emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
kristopherjohnson committed Oct 29, 2019
1 parent 4dc3e07 commit 441c237
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 1 deletion.
10 changes: 9 additions & 1 deletion MenubarCountdown/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,22 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
else {
timeString = NSString(format: "%02d:%02d", hours, minutes) as String
}
statusItem.button?.image = nil
statusItem.button?.title = timeString
}

/**
Change the status item to an hourglass icon
*/
func showStatusItemIcon() {
statusItem.button?.title = "⌛️"
statusItem.button?.title = ""
if let image = NSImage(named: "HourglassIcon") {
image.isTemplate = true
statusItem.button?.image = image
}
else {
Log.error("unable to load HourglassIcon")
}
}

func startBlinking() {
Expand Down
6 changes: 6 additions & 0 deletions MenubarCountdown/Assets.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "HourglassIconBlack.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 441c237

Please sign in to comment.