CGBitmapContextCreate takes a CGBitmapInfo, and the three calls in
dockflap_darwin.go (mpDockContext, mpDockFill) and trayimage_darwin.go
(mpMasked) passed a CGImageAlphaInfo value. The macOS 26 SDK's clang
warns on that implicit enum-to-enum conversion, and the CI log's problem
matcher shows each warning as an ##[error] line. Each call now casts the
constant to CGBitmapInfo; the alpha info sits in the same low bits, so
the bitmaps are the same.
These warnings do not fail go vet (its exit is 0 before and after), so
this does not turn the macOS CI job green: that job fails on
TestStopLetsARenewalEnd in internal/plugin. It takes three false
##[error] lines out of the log.
Run on mote (macOS 27, CLT clang), base origin/main 4e7661adc:
- go vet ./internal/gui/ before: exit 0, three -Wenum-conversion warnings
in internal/gui; after: exit 0, none in internal/gui
- gofmt -l on both files: nothing; go build ./internal/gui/: ok
Not tried: no test covers the bitmaps' pixels; the change is a C type
cast only. GOOS=linux/windows builds don't compile these files.
Co-authored-by: ggbdpq <ggbdpq@gmail.com>
Beside Surge's speeds and another app's stacked "0 KB/s", magpie's
"93% / 98%" read visibly bolder, and a lone "98%" too small and too
heavy, so the reporter kept it out of the menu bar. mpRowFont drew two
stacked rows in 9.5pt semibold and one row in 11pt medium, both since
ef4edf8c5 (the first drawn image, no owner call on the weight). Now:
- two rows: monospacedDigitSystemFont 10pt regular (was 9.5pt
semibold); row gap unchanged (3.5pt), the block 17.6pt as Surge's;
- one row: monospacedDigitSystemFont at menuBarFont(0)'s size (13pt
on macOS 27, was 11pt), regular (was medium);
- the letter-in-a-ring stand-in for a logo, the template tint and the
light/dark colours are unchanged. Linux shows the figures as the
tray's text label (the panel's font) and Windows' tray shows none,
so neither has a font to change.
Measured in the reporter's q1: magpie's digits were Surge's height
(13px) with stems 1.30x as wide (2.80 vs 2.16px). Rendered at 2x the
stems go 2.47 -> 2.04px for two rows (medium was 2.14; regular is the
closer of the two to Surge and the other app).
TestTrayRowFont (new): two rows 9.5-10.5pt, weight trait <= medium,
digits of one width; one row the menu bar font's size, weight 0, one
width. Red on the old fonts by hand (9.5pt weight 0.30; 11pt weight
0.23 vs the menu bar's 13pt). gui-shell.md says the new sizes.
Run on mote at the pushed head (rebased on origin/main), through
mote-run: gofmt -l internal/gui (empty); go vet ./internal/gui/;
GOOS=linux go vet -tags nogui, GOOS=windows go vet (with and without
nogui) ./internal/gui/; go test -count=1 ./internal/gui/ and with
-tags nogui: all pass but TestSettingsSaveKeepsWhatItDoesNotSend
(#4514, SearchAll) and TestMainWindowCorners/macOS_26_SDK (#3949,
macOS 27), both filed and red on origin/main too; the nogui run also
met TestColdTurnsTaken (#4510, the turn warm-up's race: 1 of 5 red
alone, then a hang to the timeout, at load ~35). Every TestTray* test
passes, run again alone with -v.
Compared visually: a throwaway test rendered the image through
trayImagePNG at 24pt 2x, light and dark, before and after, for two
rows and one, plain and beside a logo, and a mixed pair; laid beside
the reporter's crop of Surge's figures.
Not tried: the live menu bar beside Surge and iStat Menus (no real
app run; renders only), a non-Retina screen, and the full Go suite
and GUI suite (the change is AppKit drawing in one package).
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
#662 (ebcd5281, v0.1.749) made a click on one of the menu bar's allowance cards open the panel on Allowances at that card, and left a click on the bird as it was: the panel opens on the tab it was left on. 9aa7a3dc then let the menu bar show the cards without the bird, and the cards became the whole item: every click landed on one, so the panel opened on Allowances every time and there was nowhere left to click that kept the tab. Without the bird, mpClickCell now leaves the click to the item's own action, as a click on the bird; with the bird, a card still opens its allowance. The tab is remembered as before (magpie.panelTab); nothing of it changed.
TestTrayImageClickWithoutBird (each cell of the logo and plain layouts, laid out with no bird: not taken for its card, no callback) fails without the change ("cell 0 taken for its card with no bird") and passes; TestTrayImageClickIdentity keeps the bird's case. Tried in the real menu bar with a sandbox magpie (trayNoBird, the owner's trayUsages): origin/main opened on Allowances after Routing was picked; with the change, Usage picked, the panel closed and reopened twice by clicking the cards, opened on Usage both times. go test ./internal/gui, -race -count=5 on the tray click tests, go vet (darwin, windows), linux (nogui) and windows builds pass.
* gui: navigate menu-bar quota cells to allowance cards
* gui: fix quota navigation in lightweight and folded views
Route quota hits through the existing status-item monitor rather than relying on local monitor ordering. Recreate released panels through panelWin, and expand hidden accounts before focusing them. Keep panel headers non-draggable and cancel pending navigation after five seconds or purposeful scrolling.
Add a native AppKit subprocess regression that fails with the former nil-panel dereference and verifies runtime-queued focus, closing, and recreation. Extend browser checks for folded accounts, expiry, cancellation, and panel drag state.
Clicking the icon lit it for a moment and put it out again: Wails sends
the action on mouse-down, and the button's own tracking takes the
highlight off on mouse-up, so it never stayed on while the panel was open,
as other apps' items do. Lighting it from the panel's show alone still
flickered (lit on press, out on release, lit again).
mpOwnClicks (a local event monitor, installed once) now hands a left click
on magpie's item to its action and swallows the mouse-down, so the button
never tracks it; mpHighlight lights it when the panel shows and puts it out
when it hides (events.Mac.WindowShow/WindowHide, hooked in makePanel, so a
panel made again after lightweight mode has them too). Right clicks keep
Wails' path and its native menu highlight. Linux and Windows get no-ops.
go build (darwin app, GOOS=linux -tags nogui, GOOS=windows), go vet
./internal/gui and go test ./internal/gui pass. No automated test: it
needs a live status item. To check by hand: a click lights it once and it stays
lit; click again, a click elsewhere or Escape puts it out; right click
still opens the menu, highlighted.