mirror of
https://github.com/vsariola/sointu.git
synced 2026-02-19 14:43:29 -05:00
fix(tracker/gioui): text.Shaper should not be a global variable
text.Shaper is not thread safe, which caused crash when adding multiple VSTI plugins to a DAW project. This change fixes that crash. Further refactorings need to consider where that text.Shaper should actually reside.
This commit is contained in:
parent
3c85f1155c
commit
a38a0f4235
@ -52,7 +52,7 @@ func (p ParameterStyle) Layout(gtx C) D {
|
||||
layout.Rigid(func(gtx C) D {
|
||||
return p.ParameterWidget.labelBtn.Layout(gtx, func(gtx C) D {
|
||||
gtx.Constraints.Min.X = gtx.Dp(unit.Dp(110))
|
||||
return layout.E.Layout(gtx, Label(p.Parameter.Name, white))
|
||||
return layout.E.Layout(gtx, Label(p.Parameter.Name, white, p.tracker.TextShaper))
|
||||
})
|
||||
}),
|
||||
layout.Rigid(func(gtx C) D {
|
||||
@ -154,7 +154,7 @@ func (p ParameterStyle) Layout(gtx C) D {
|
||||
}),
|
||||
layout.Rigid(func(gtx C) D {
|
||||
if p.Parameter.Type != tracker.IDParameter {
|
||||
return Label(p.Parameter.Hint, white)(gtx)
|
||||
return Label(p.Parameter.Hint, white, p.tracker.TextShaper)(gtx)
|
||||
}
|
||||
return D{}
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user