@ -520,7 +520,7 @@ type Dismiss struct {
}
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 )
paint . Fill ( gtx . Ops , color )
}
@ -787,9 +787,8 @@ func (ui *UI) layoutShareDialog(gtx layout.Context, sysIns system.Insets) {
} )
// Swallow clicks to title.
var c widget . Clickable
gtx . Constraints . Min = d . Size
c . Layout ( gtx )
return d
gtx . Queue = nil
return c . Layout ( gtx , func ( gtx C ) D { return d } )
} ) ,
layout . Rigid ( func ( gtx C ) D {
if d . loaded {
@ -1145,7 +1144,7 @@ func (ui *UI) layoutTop(gtx layout.Context, sysIns system.Insets, state *Backend
if state . State <= ipn . NeedsLogin {
return D { }
}
sw := material . Switch ( ui . theme , & ui . enabled )
sw := material . Switch ( ui . theme , & ui . enabled , "Enable VPN" )
sw . Color . Enabled = rgb ( white )
if state . State < ipn . Stopped {
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 {
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 . Background = color . NRGBA { }
return btn . Layout ( gtx )