theme/fluent/textfield.go

Functions Structs

Functions

func PaintTextField

PaintTextField renders a text field according to Fluent Design specifications.

func (p TextFieldPainter) PaintTextField(canvas widget.Canvas, st textfield.PaintState) {
	if st.Bounds.IsEmpty() {
		return
	}

	colors := p.resolveColors()
	flPaintTFBackground(canvas, st, colors)
	flPaintTFBorder(canvas, st, colors)
	flPaintTFContent(canvas, st, colors)
	flPaintTFCursor(canvas, st, colors)
	flPaintTFError(canvas, st, colors)
}

Structs

type TextFieldPainter struct

TextFieldPainter renders text fields using Fluent Design tokens.

Fluent text fields feature a subtle bottom accent border on focus

and clean rectangular shape with small corner radius.

 

If Theme is nil, TextFieldPainter falls back to the default Fluent Blue palette.

type TextFieldPainter struct {
	Theme *Theme	// nil uses default Fluent Blue fallback
}