Type LayoutProblem

type LayoutProblem struct {
	Kind   LayoutKind
	Bounds ui.Rect
	Text   string
	Detail string
}

LayoutProblem is one suspicious spot in a frame. Bounds is where it is; Text is the painted text or the control's label.

Constructors

CheckLayout#

func CheckLayout(snapshot app.Snapshot) []LayoutProblem

CheckLayout finds geometry in snapshot that is almost surely a bug: text that is cut off, runs out of its button or field, lies over other text, or leaves the window, and focusable controls that cross each other. It reads the frame the application painted and decides nothing about intent, so a deliberate overlap (an overlay drawn on its own layer is not one) still shows. Problems come from the top of the window down.