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
This commit is contained in:
vsariola 2021-02-14 19:59:08 +02:00
parent cece2d77d4
commit e2fcfbbc4a
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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))