Added a toggle button and lamp pattern

This commit is contained in:
Sasha Koshka
2023-04-20 18:40:05 -04:00
parent e5619ebf07
commit 2bd7d0fad5
8 changed files with 308 additions and 4 deletions
-2
View File
@@ -262,12 +262,10 @@ func (element *List) scrollToSelected () {
padding := element.theme.Padding(tomo.PatternBackground)
bounds := padding.Apply(element.entity.Bounds())
if target.Min.Y < bounds.Min.Y {
// TODO
element.scroll.Y -= bounds.Min.Y - target.Min.Y
element.entity.Invalidate()
element.entity.InvalidateLayout()
} else if target.Max.Y > bounds.Max.Y {
// TODO
element.scroll.Y += target.Max.Y - bounds.Max.Y
element.entity.Invalidate()
element.entity.InvalidateLayout()