From e2fcfbbc4ae0e11ef37c97d84cab86bf4bc8f3ce Mon Sep 17 00:00:00 2001 From: vsariola <5684185+vsariola@users.noreply.github.com> Date: Sun, 14 Feb 2021 19:59:08 +0200 Subject: [PATCH] refactor(tracker): move C & D type shortcuts for layout.Context and layout.Dimensions to layout.go layout.go is where the basic core of the layout should reside --- tracker/instruments.go | 3 --- tracker/layout.go | 3 +++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tracker/instruments.go b/tracker/instruments.go index a96c307..2aff3f7 100644 --- a/tracker/instruments.go +++ b/tracker/instruments.go @@ -14,9 +14,6 @@ import ( "golang.org/x/exp/shiny/materialdesign/icons" ) -type C = layout.Context -type D = layout.Dimensions - func (t *Tracker) updateInstrumentScroll() { if t.CurrentInstrument > 7 { t.InstrumentDragList.List.Position.First = t.CurrentInstrument - 7 diff --git a/tracker/layout.go b/tracker/layout.go index 50a7a5f..9b33e87 100644 --- a/tracker/layout.go +++ b/tracker/layout.go @@ -11,6 +11,9 @@ import ( "gioui.org/widget/material" ) +type C = layout.Context +type D = layout.Dimensions + func smallButton(icStyle material.IconButtonStyle) material.IconButtonStyle { icStyle.Size = unit.Dp(14) icStyle.Inset = layout.UniformInset(unit.Dp(1))