refactor(tracker/gioui): move element etc. functions away from style

Now the element / fg / bg functions are passed to the actual Layout
function, not first put to the style. This avoids moving of the
element function to heap.
This commit is contained in:
2025-06-11 19:14:11 +03:00
parent de2e64533d
commit d20a23d57b
6 changed files with 35 additions and 39 deletions
+2 -2
View File
@@ -321,12 +321,12 @@ func (te *NoteEditor) layoutTracks(gtx C, t *Tracker) D {
widget.Label{Alignment: text.Middle}.Layout(gtx, t.Theme.Material.Shaper, t.Theme.NoteEditor.Note.Font, t.Theme.NoteEditor.Note.TextSize, val, op)
return D{Size: image.Pt(pxWidth, pxHeight)}
}
table := FilledScrollTable(t.Theme, te.scrollTable, cell, colTitle, rowTitle, nil, rowTitleBg)
table := FilledScrollTable(t.Theme, te.scrollTable)
table.RowTitleWidth = trackPatMarkWidth + trackRowMarkWidth
table.ColumnTitleHeight = trackColTitleHeight
table.CellWidth = trackColWidth
table.CellHeight = trackRowHeight
return table.Layout(gtx)
return table.Layout(gtx, cell, colTitle, rowTitle, nil, rowTitleBg)
}
func colorOp(gtx C, c color.NRGBA) op.CallOp {