~gioverse/chat

ref: f3d6c43bfc4ccaad1a875feb9e6ed24a6ca7916d chat/debug/debug.go -rw-r--r-- 423 bytes
f3d6c43bJack Mordaunt list: hotfix ignore direction 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
Package debug provides tools for debugging Gio layout code.
*/
package debug

import (
	"image/color"

	"gioui.org/layout"
	"gioui.org/unit"
	"gioui.org/widget"
)

type (
	C = layout.Context
	D = layout.Dimensions
)

// Outline traces a small black outline around the provided widget.
func Outline(gtx C, w func(gtx C) D) D {
	return widget.Border{
		Color: color.NRGBA{A: 255},
		Width: unit.Dp(1),
	}.Layout(gtx, w)
}