Added music icon, use this icon when music is being played

master
Ronald1985 2 years ago
parent 7efb53aa57
commit a404675649

@ -0,0 +1,23 @@
//+build linux darwin
// File generated by 2goarray v0.1.0 (http://github.com/cratonica/2goarray)
package icon
var Data []byte = []byte{
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20,
0x08, 0x06, 0x00, 0x00, 0x00, 0x73, 0x7a, 0x7a, 0xf4, 0x00, 0x00, 0x00,
0x66, 0x49, 0x44, 0x41, 0x54, 0x58, 0x85, 0xed, 0x94, 0xc1, 0x0a, 0xc0,
0x30, 0x08, 0x43, 0xd3, 0xb2, 0xff, 0xff, 0x65, 0x7b, 0x2d, 0xe2, 0xc1,
0x05, 0x45, 0xd8, 0xf2, 0x8e, 0xa5, 0xb6, 0x21, 0x6a, 0x00, 0x21, 0xc4,
0xdf, 0x59, 0x44, 0x8d, 0x15, 0xbd, 0x03, 0x00, 0xd8, 0x6c, 0xa1, 0x23,
0x12, 0xd5, 0x86, 0x05, 0x1f, 0x46, 0x67, 0x29, 0xaa, 0x1c, 0xb8, 0x85,
0x8c, 0x08, 0x18, 0x9f, 0x01, 0x9a, 0x4a, 0x01, 0x94, 0x0b, 0xd5, 0x0e,
0xbc, 0x16, 0xf1, 0xa9, 0x16, 0x50, 0x3c, 0xc9, 0x7b, 0x6d, 0x41, 0x93,
0x71, 0xa0, 0x35, 0xe5, 0xc6, 0x5b, 0x20, 0x01, 0xd9, 0xbd, 0xf5, 0x73,
0x40, 0x47, 0xaf, 0x10, 0x42, 0x78, 0x0e, 0x53, 0x84, 0x0a, 0x1a, 0xfa,
0x5d, 0x0e, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae,
0x42, 0x60, 0x82,
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 B

@ -13,6 +13,7 @@ import (
disabledicon "gitea.ronald1985.uk/ronald1985/Eye-Reminder/icons/disabledicon"
enabledicon "gitea.ronald1985.uk/ronald1985/Eye-Reminder/icons/enabledicon"
musicicon "gitea.ronald1985.uk/ronald1985/Eye-Reminder/icons/musicicon"
"github.com/gen2brain/beeep"
"github.com/gen2brain/malgo"
@ -178,6 +179,7 @@ func systrayOnReady() {
var notificationsEnabled bool = true
var soundEnabled bool = ProgramConfig.SoundEnabled
var stopSound bool = false
currentIcon := enabledicon.Data
systray.SetTitle("Eye Reminder")
systray.SetTooltip("Eye Reminder")
systray.SetIcon(enabledicon.Data)
@ -221,9 +223,15 @@ func systrayOnReady() {
mStopSound.Enable()
systray.SetIcon(musicicon.Data)
PlayWAVFile(ProgramConfig.WAVFile, &stopSound)
mStopSound.Disable()
stopSound = false
systray.SetIcon(currentIcon)
}
lastTimeNotificationWasSent = time.Now()
@ -240,13 +248,15 @@ func systrayOnReady() {
enabled = false
systray.SetIcon(disabledicon.Data)
currentIcon = disabledicon.Data
systray.SetIcon(currentIcon)
} else {
mEnabled.Check()
enabled = true
systray.SetIcon(enabledicon.Data)
currentIcon = enabledicon.Data
systray.SetIcon(currentIcon)
}
case <-mNotificationsEnabled.ClickedCh:
if mNotificationsEnabled.Checked() {

Loading…
Cancel
Save