clear status label on button exit

This commit is contained in:
piotr 2024-02-01 18:24:14 +01:00
parent 7b2ed76fac
commit 8e02b59f83

View File

@ -281,6 +281,9 @@ func flowBoxButton(entry desktopEntry) *gtk.Button {
button.Connect("enter-notify-event", func() {
statusLabel.SetText(desc)
})
button.Connect("leave-notify-event", func() {
statusLabel.SetText("")
})
button.Connect("focus-in-event", func() {
statusLabel.SetText(desc)
})
@ -317,6 +320,9 @@ func powerButton(iconPath, command string) *gtk.Button {
button.Connect("enter-notify-event", func() {
statusLabel.SetText(command)
})
button.Connect("leave-notify-event", func() {
statusLabel.SetText("")
})
button.Connect("focus-in-event", func() {
statusLabel.SetText(command)
})