chore: fix linter problems in work space (remove unuseds etc.)

This commit is contained in:
5684185+vsariola@users.noreply.github.com
2024-10-15 09:18:41 +03:00
parent b494a69a76
commit 5099c61705
13 changed files with 13 additions and 71 deletions

View File

@ -143,28 +143,3 @@ func (s *ScrollBar) Layout(gtx C, width unit.Dp, numItems int, pos *layout.Posit
return D{Size: gtx.Constraints.Min}
}
func scrollToView(l *layout.List, index int, length int) {
pmin := index + 2 - l.Position.Count
pmax := index - 1
if pmin < 0 {
pmin = 0
}
if pmax < 0 {
pmax = 0
}
m := length - 1
if pmin > m {
pmin = m
}
if pmax > m {
pmax = m
}
if l.Position.First > pmax {
l.Position.First = pmax
l.Position.Offset = 0
}
if l.Position.First < pmin {
l.Position.First = pmin
}
}