@ -520,7 +520,7 @@ type Dismiss struct {
}
}
func ( d * Dismiss ) Add ( gtx layout . Context , color color . NRGBA ) {
func ( d * Dismiss ) Add ( gtx layout . Context , color color . NRGBA ) {
defer pointer . Rect ( image . Rectangle { Max : gtx . Constraints . Min } ) . Push ( gtx . Ops ) . Pop ( )
defer cli p. Rect ( image . Rectangle { Max : gtx . Constraints . Min } ) . Push ( gtx . Ops ) . Pop ( )
pointer . InputOp { Tag : d , Types : pointer . Press } . Add ( gtx . Ops )
pointer . InputOp { Tag : d , Types : pointer . Press } . Add ( gtx . Ops )
paint . Fill ( gtx . Ops , color )
paint . Fill ( gtx . Ops , color )
}
}
@ -787,9 +787,8 @@ func (ui *UI) layoutShareDialog(gtx layout.Context, sysIns system.Insets) {
} )
} )
// Swallow clicks to title.
// Swallow clicks to title.
var c widget . Clickable
var c widget . Clickable
gtx . Constraints . Min = d . Size
gtx . Queue = nil
c . Layout ( gtx )
return c . Layout ( gtx , func ( gtx C ) D { return d } )
return d
} ) ,
} ) ,
layout . Rigid ( func ( gtx C ) D {
layout . Rigid ( func ( gtx C ) D {
if d . loaded {
if d . loaded {
@ -1145,7 +1144,7 @@ func (ui *UI) layoutTop(gtx layout.Context, sysIns system.Insets, state *Backend
if state . State <= ipn . NeedsLogin {
if state . State <= ipn . NeedsLogin {
return D { }
return D { }
}
}
sw := material . Switch ( ui . theme , & ui . enabled )
sw := material . Switch ( ui . theme , & ui . enabled , "Enable VPN" )
sw . Color . Enabled = rgb ( white )
sw . Color . Enabled = rgb ( white )
if state . State < ipn . Stopped {
if state . State < ipn . Stopped {
sw . Color . Enabled = rgb ( 0xbbbbbb )
sw . Color . Enabled = rgb ( 0xbbbbbb )
@ -1167,7 +1166,7 @@ func (ui *UI) layoutTop(gtx layout.Context, sysIns system.Insets, state *Backend
if state . State <= ipn . NeedsLogin {
if state . State <= ipn . NeedsLogin {
return D { }
return D { }
}
}
btn := material . IconButton ( ui . theme , & ui . menu . open , ui . icons . more )
btn := material . IconButton ( ui . theme , & ui . menu . open , ui . icons . more , "Open menu" )
btn . Color = rgb ( white )
btn . Color = rgb ( white )
btn . Background = color . NRGBA { }
btn . Background = color . NRGBA { }
return btn . Layout ( gtx )
return btn . Layout ( gtx )