NextCommit (macOS, 0.1.1244) hovered the menu bar item for today's
tokens split into input, output and cache and saw nothing. Nothing was
shown at all: Wails v3.0.0-beta.24's macosSystemTray.setTooltip is a
no-op ("Tooltips not supported on macOS"), so neither the idle tip nor a
card's tooltip (usage:today already said "6.3M tokens (912K in · 318K
out · 5.1M cached)") ever reached a Mac. Linux has its own setTrayTip
(SNI); Windows keeps Wails'.
setTrayTip on the Mac now sets the status item's button toolTip on the
main queue (trayTipNative, mpTip in trayimage_darwin.go), returning false
while the item isn't up yet so it is tried again, as Linux's does.
Run: TestMacTrayTipIsSet (darwin, cgo): setTrayTip reaches the native
setter, false before the item is up, and a real NSStatusBarButton keeps a
multi-line tip whole. go vet: darwin (cgo, GUI) and -tags nogui for
darwin, linux and windows. Not tried: hovering the icon in a built app.
Full suite: SUITE_LINE
21 lines
506 B
Go
21 lines
506 B
Go
//go:build !darwin || !cgo
|
|
|
|
package gui
|
|
|
|
// Only the Mac's menu bar draws the cards as an image (trayimage_darwin.go);
|
|
// other trays show the text.
|
|
|
|
func trayImageShow([]trayCell, []byte) bool { return false }
|
|
|
|
func trayImageFrame([]byte) bool { return false }
|
|
|
|
func trayImageHide() {}
|
|
|
|
func trayHighlight(bool) {}
|
|
|
|
func trayOwnClicks() {}
|
|
|
|
// trayTipNative: Wails' SetTooltip sets Windows' own; Linux has setTrayTip
|
|
// of its own (traytip_linux.go).
|
|
var trayTipNative = func(string) bool { return true }
|