Skip to content

Commit

Permalink
U: touchbar demo
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangli10 committed Dec 6, 2023
1 parent 54459cd commit 9a751f9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions example/macos/touchbar/touchbar.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func main() {
}
window.Maximize()
isMax = !isMax
ipc.Emit("touchbar", 1, "touch bar max button")
ipc.Emit("touchbar", 1, "touch bar: max button")
switcher.Update()
},
}
Expand All @@ -81,12 +81,16 @@ func main() {
if isMin {
window.Restore()
minBtn.Title = "最小化"
fullScreenBtn.Disabled = false
maxBtn.Disabled = false
} else {
window.Minimize()
minBtn.Title = "还原"
fullScreenBtn.Disabled = true
maxBtn.Disabled = true
}
isMin = !isMin
ipc.Emit("touchbar", 2, "touch bar min button")
ipc.Emit("touchbar", 2, "touch bar: min button")
switcher.Update()
},
}
Expand All @@ -105,7 +109,7 @@ func main() {
maxBtn.Disabled = true
}
isFull = !isFull
ipc.Emit("touchbar", 3, "touch bar full screen button")
ipc.Emit("touchbar", 3, "touch bar: full screen button")
switcher.Update()
},
}
Expand Down

0 comments on commit 9a751f9

Please sign in to comment.