~eliasnaur/gio

816bda7ac7bd8df14b2c9d5e68938487c4e603ab — Chris Waldon 1 year, 2 months ago bba9126
widget: update textIterator docs for accuracy

The previous docs claimed that failing to set a textMaterial would result in
invisible glyphs when in reality it results in using whatever the current paint
material is. This could be the paint material from before laying out the glyphs,
or it could be the material for a bitmap glyph. As such, it's better to say that
the color is undefined.

Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>
1 files changed, 2 insertions(+), 1 deletions(-)

M widget/label.go
M widget/label.go => widget/label.go +2 -1
@@ 84,7 84,8 @@ type textIterator struct {
	// maxLines is the maximum number of text lines that should be displayed.
	maxLines int
	// material sets the paint material for the text glyphs. If none is provided
	// the glyphs will be invisible.
	// the color of the glyphs is undefined and may change unpredictably if the
	// text contains color glyphs.
	material op.CallOp

	// linesSeen tracks the quantity of line endings this iterator has seen.