Documentation
¶
Overview ¶
Package debug provides tools for layout debugging.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Layout ¶
Layout wraps w with a debug.ConstraintEditor. The state for the constraint editor is stored automatically using the unique tag provided. Note: the state will never be deleted.
Types ¶
type ConstraintEditor ¶
type ConstraintEditor struct {
// LineWidth is the width of debug overlay lines like those outlining the constraints
// and widget size.
LineWidth unit.Dp
// MinSize is the side length of the smallest the editor is allowed to go. If the editor
// makes the constraints smaller than this, it will reset itself. If the constraints are
// already smaller than this, the editor will not display itself.
MinSize unit.Dp
// TextSize determines the size of the on-screen contextual help text.
TextSize unit.Sp
MinColor, MaxColor, SizeColor, SurfaceColor color.NRGBA
// contains filtered or unexported fields
}
ConstraintEditor provides controls to edit layout constraints live.
func (*ConstraintEditor) Layout ¶
func (c *ConstraintEditor) Layout(gtx layout.Context, w layout.Widget) layout.Dimensions
Layout the constraint editor to debug the layout of w.
Click to show internal directories.
Click to hide internal directories.