diff --git a/tracker/layout.go b/tracker/layout.go index 9b33e87..47aad17 100644 --- a/tracker/layout.go +++ b/tracker/layout.go @@ -6,37 +6,11 @@ import ( "gioui.org/layout" "gioui.org/op/clip" "gioui.org/op/paint" - "gioui.org/unit" - "gioui.org/widget" - "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)) - return icStyle -} - -func enableButton(icStyle material.IconButtonStyle, enabled bool) material.IconButtonStyle { - if !enabled { - icStyle.Background = disabledContainerColor - icStyle.Color = disabledTextColor - } - return icStyle -} - -func trackButton(t *material.Theme, w *widget.Clickable, text string, enabled bool) material.ButtonStyle { - ret := material.Button(t, w, text) - if !enabled { - ret.Background = disabledContainerColor - ret.Color = disabledTextColor - } - return ret -} - func (t *Tracker) Layout(gtx layout.Context) { paint.FillShape(gtx.Ops, backgroundColor, clip.Rect(image.Rect(0, 0, gtx.Constraints.Max.X, gtx.Constraints.Max.Y)).Op()) t.VerticalSplit.Layout(gtx,