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
-3
View File
@@ -153,9 +153,6 @@ func (c *Config) Px(v ui.Value) int {
default:
panic("unknown unit")
}
if math.IsInf(float64(r), +1) {
return ui.Inf
}
return int(math.Round(float64(r)))
}