mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 21:14:31 -04:00
chore: fix linter problems in work space (remove unuseds etc.)
This commit is contained in:
parent
b494a69a76
commit
5099c61705
@ -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
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user