ui: get rid of Inf

It's not worth the special cases. Use a large value where needed
(layout.List, text.Editor...) instead.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-07-29 12:12:51 +02:00
parent 1b684ffab6
commit 5f2adf9b2f
10 changed files with 33 additions and 81 deletions
+1 -3
View File
@@ -148,9 +148,7 @@ func layoutText(ppem fixed.Int26_6, str string, f *opentype, opts text.LayoutOpt
}
var lines []text.Line
maxDotX := fixed.Int26_6(math.MaxInt32)
if opts.MaxWidth != ui.Inf {
maxDotX = fixed.I(opts.MaxWidth)
}
maxDotX = fixed.I(opts.MaxWidth)
type state struct {
r rune
advs []fixed.Int26_6