From 7a030683c69064ebced5c078cfd659935a12b153 Mon Sep 17 00:00:00 2001 From: "5684185+vsariola@users.noreply.github.com" <5684185+vsariola@users.noreply.github.com> Date: Tue, 24 Jun 2025 19:10:29 +0300 Subject: [PATCH] refactor(tracker/gioui): use precreated hex strings in OrderEditor --- tracker/gioui/order_editor.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tracker/gioui/order_editor.go b/tracker/gioui/order_editor.go index 4519fd6..6950ee9 100644 --- a/tracker/gioui/order_editor.go +++ b/tracker/gioui/order_editor.go @@ -1,11 +1,9 @@ package gioui import ( - "fmt" "image" "math" "strconv" - "strings" "gioui.org/f32" "gioui.org/io/event" @@ -89,7 +87,7 @@ func (oe *OrderEditor) Layout(gtx C, t *Tracker) D { callOp = loopMarkerColorOp } 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))} }