mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-20 05:54:34 -04:00
refactor(tracker/gioui): use precreated hex strings in OrderEditor
This commit is contained in:
parent
17ca15b205
commit
7a030683c6
@ -1,11 +1,9 @@
|
|||||||
package gioui
|
package gioui
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"image"
|
"image"
|
||||||
"math"
|
"math"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
|
||||||
|
|
||||||
"gioui.org/f32"
|
"gioui.org/f32"
|
||||||
"gioui.org/io/event"
|
"gioui.org/io/event"
|
||||||
@ -89,7 +87,7 @@ func (oe *OrderEditor) Layout(gtx C, t *Tracker) D {
|
|||||||
callOp = loopMarkerColorOp
|
callOp = loopMarkerColorOp
|
||||||
}
|
}
|
||||||
defer op.Offset(image.Pt(0, -2)).Push(gtx.Ops).Pop()
|
defer op.Offset(image.Pt(0, -2)).Push(gtx.Ops).Pop()
|
||||||
widget.Label{}.Layout(gtx, t.Theme.Material.Shaper, t.Theme.OrderEditor.RowTitle.Font, t.Theme.OrderEditor.RowTitle.TextSize, strings.ToUpper(fmt.Sprintf("%02x", j)), callOp)
|
widget.Label{}.Layout(gtx, t.Theme.Material.Shaper, t.Theme.OrderEditor.RowTitle.Font, t.Theme.OrderEditor.RowTitle.TextSize, hexStr[j&255], callOp)
|
||||||
return D{Size: image.Pt(w, gtx.Dp(patternCellHeight))}
|
return D{Size: image.Pt(w, gtx.Dp(patternCellHeight))}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user