Tweaked list theming
This commit is contained in:
parent
1c0dee1b95
commit
fc4b2eb36d
@ -276,6 +276,8 @@ func (Default) Padding (id tomo.Pattern, c tomo.Case) artist.Inset {
|
||||
case tomo.PatternSunken:
|
||||
if c.Match("tomo", "progressBar", "") {
|
||||
return artist.I(2, 1, 1, 2)
|
||||
} else if c.Match("tomo", "list", "") {
|
||||
return artist.I(2)
|
||||
} else {
|
||||
return artist.I(8)
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ func (element *List) selectNone () {
|
||||
func (element *List) scrollToSelected () {
|
||||
if element.selected < 0 { return }
|
||||
target := element.entity.Child(element.selected).Entity().Bounds()
|
||||
padding := element.theme.Padding(tomo.PatternBackground)
|
||||
padding := element.theme.Padding(tomo.PatternSunken)
|
||||
bounds := padding.Apply(element.entity.Bounds())
|
||||
if target.Min.Y < bounds.Min.Y {
|
||||
element.scroll.Y -= bounds.Min.Y - target.Min.Y
|
||||
|
Reference in New Issue
Block a user