From 816bda7ac7bd8df14b2c9d5e68938487c4e603ab Mon Sep 17 00:00:00 2001 From: Chris Waldon Date: Wed, 26 Apr 2023 09:24:43 -0400 Subject: [PATCH] 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 --- widget/label.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widget/label.go b/widget/label.go index 5d7eae85..7c6eecba 100644 --- a/widget/label.go +++ b/widget/label.go @@ -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.