feat(tracker): change tracker to more material.io style

This commit is contained in:
vsariola
2021-01-09 21:26:40 +02:00
parent eb25ddd864
commit 82771832ed
6 changed files with 85 additions and 52 deletions

View File

@ -22,7 +22,7 @@ func (t *Tracker) layoutPatterns(tracks []sointu.Track, activeTrack, cursorPatte
gtx.Constraints.Max.X = patternCellWidth * len(tracks)
defer op.Push(gtx.Ops).Pop()
clip.Rect{Max: gtx.Constraints.Max}.Add(gtx.Ops)
paint.FillShape(gtx.Ops, panelColor, clip.Rect{Max: image.Pt(gtx.Constraints.Max.X, trackRowHeight)}.Op())
paint.FillShape(gtx.Ops, patternSurfaceColor, clip.Rect{Max: image.Pt(gtx.Constraints.Max.X, trackRowHeight)}.Op())
for i, track := range tracks {
pop := op.Push(gtx.Ops)
clip.Rect{Max: gtx.Constraints.Max}.Add(gtx.Ops)
@ -30,10 +30,6 @@ func (t *Tracker) layoutPatterns(tracks []sointu.Track, activeTrack, cursorPatte
paint.FillShape(gtx.Ops, activeTrackColor, clip.Rect{
Max: gtx.Constraints.Max,
}.Op())
} else {
paint.FillShape(gtx.Ops, inactiveTrackColor, clip.Rect{
Max: gtx.Constraints.Max,
}.Op())
}
for j, p := range track.Sequence {
if j == playingPattern {