Highlights
- macOS: animated apps no longer pile up GPU memory. Textures of transient canvases and idle images are freed while an animation runs, so an app with moving lyrics stays small instead of growing past 1.5 GB. (#1393)
New
- Menu buttons place and open their menus as the app asks.
ui.PopoverMenuButtonOptionslines a drawn menu up with the end of its button, or puts it above or beside the button, and the menu still flips at the window's edges. ItsOpenfield lets the app open or close the menu itself, for example when the item the menu acts on goes away in the background. (#1392, requested by @xiyaowong in #1386) - Richer items in drawn menus.
MenuItem.Dangershows a destructive item such as "Delete…" in the theme's caution color,Subtitleadds a muted second line,Trailingputs a value such as a file size at the item's end, andContentlets an item show anything, such as a download row with a progress bar.Highlightedtells the menu which item the pointer or keyboard is on, so it can preview it,IDkeeps a choice and the highlight on their item as labels change or items come and go, andMenu.MaxWidthcaps the menu's width with labels ending in an ellipsis. Screen readers read the subtitle and trailing value as the item's description. (#1391, requested by @xiyaowong in #1385) - SVG icons and per-item icon colors in menus.
mygo.NewMenuIconSVGmakes a menu icon from the sameui.SVGan app already uses forui.Icon, andMenuItem.IconColortints a template icon in the menus MyGo draws, following the highlight and dimming with a disabled item.(*ui.SVG).Imagerenders an SVG to pixels. (#1392, requested by @xiyaowong in #1387) ListState.HoldPlacekeeps a chat or log list where it is. One call in a click handler keeps the clicked line in place when a fold in the last row opens, and the list follows the end again once it shows it. (#1390, requested by @lixw1994 in #1389)
Fixes
UI and apps
- A
ListreadsFollowEndat each layout, so turning it off or on takes effect in the same frame. (#1390, reported by @lixw1994 in #1389)
TypeScript bindings
- A bound Go method with a parameter named
callgenerates TypeScript that type-checks. (#1388, @HiPanJin)
Full Changelog: v0.8.0...v0.8.1