Repository navigation
Added
widget.TextCaretPositioner(#236, by @samyfodil) — optional Canvas interface reporting the caret offset before every rune of a string, from the shaped form of the whole string. Implemented by the renderCanvasandSceneCanvas; canvases that do not implement it keep the previous prefix-measurement behavior.
Changed
-
deps: gg v0.52.3 → v0.52.6, gogpu v0.53.0 → v0.54.1, wgpu v0.31.4 → v0.34.9, gpucontext v0.28.0 → v0.31.3, gputypes v0.5.2 → v0.8.2, naga v0.18.0 → v0.21.4 (fixes the WGSL parser stack overflow GHSA-887q-cf99-367r), goffi v0.6.3 → v0.6.8, x/image v0.45.0, x/text v0.41.0. gg v0.52.6 is the first gg release that builds against wgpu v0.34, so
gogpu@latestandgg@latestbuild together again (#239). -
The
desktopsoftware e2e tests use the wgpu v0.34 HAL API, and their texture readback pads rows to the 256-byte copy alignment WebGPU requires. wgpu v0.34 rejects an unpadded copy, which the old helper would have turned into a skip of the readback tests; with the padding all of them run. -
llms.txtnow describes what the toolkit does and how to add it to a project, and links the getting-started guide, architecture and render-pipeline docs and the key examples. -
README and the getting-started guide no longer advise
go get github.com/gogpu/gogpu@latestandgo get github.com/gogpu/gg@latestnext toui. Upgrading those ahead ofuican select versions that do not build together. The docs now say to adduiand rungo mod tidy, which keeps gogpu and gg at the versions theuirelease was built with. -
golang.org/x/imageis marked// indirectingo.mod(go mod tidy); no package of the module imports it directly.
Fixed
- Examples build against released versions (#239) —
examples/gallery,examples/hello,examples/signalsandexamples/taskmanagerhad their owngo.modwithreplace github.com/gogpu/ui => ../..and stale pins (ui v0.1.37), which hid build failures that users got with tagged versions. They are now part of the main module, like the other examples, so CI builds every example on each change and an example always uses the dependency versions of theuirelease it ships in. - Focus changes repaint both fields (#234, by @kivutar) —
RequestFocusandReleaseFocusnow mark the widget that lost focus and the one that gained it as needing a redraw, outside the context lock. Before,SetFocusedonly flipped the flag, so inside a repaint boundary the old field kept its focus ring until something else repainted it. - README package table (#242, by @eulmdev) — a blank line inside the table ended it, so the rows after
internal/dirtyrendered as raw text. - fix(textfield): place the caret from the shaped glyph run (#236, by @samyfodil) —
CursorX,CursorRect,SelectionRect,RuneIndexFromXand horizontal scrolling measured the text before the caret as a string on its own. Kerning pairs spanning the caret were dropped and a prefix was summed from grid-fitted advances while the renderer positions glyphs from a shaping run, so the caret sat inside the character it should precede — up to 3.4px at 14px on the default font. Positions now come from the caret offsets of the whole shaped string, which also makes click-to-position exact and hit-testing one pass instead of one measurement per character.
Full Changelog: v0.1.54...v0.1.55