~eliasnaur/scatter

0f31235c4555fe6566ce3c92f80ebec67a3bebf4 — Elias Naur 3 months ago d60bb2c
cmd/scatter: fix back button scale

Signed-off-by: Elias Naur <mail@eliasnaur.com>
1 files changed, 3 insertions(+), 3 deletions(-)

M cmd/scatter/ui.go
M cmd/scatter/ui.go => cmd/scatter/ui.go +3 -3
@@ 581,9 581,9 @@ func (t *Topbar) Layout(gtx *layout.Context, insets layout.Inset, w layout.Widge
			backChild := flex.Rigid(gtx, func() {
				if t.Back {
					ico := (&icon{src: icons.NavigationArrowBack, size: unit.Dp(24)}).image(gtx, rgb(0xffffff))
					img := theme.Image(ico)
					img.Scale = 1
					img.Layout(gtx)
					ico.Add(gtx.Ops)
					paint.PaintOp{Rect: f32.Rectangle{Max: toPointF(ico.Size())}}.Add(gtx.Ops)
					gtx.Dimensions.Size = ico.Size()
					gtx.Dimensions.Size.X += gtx.Px(unit.Dp(4))
					pointer.RectAreaOp{Rect: image.Rectangle{Max: gtx.Dimensions.Size}}.Add(gtx.Ops)
					t.backClick.Add(gtx.Ops)