MCPcopy Create free account
hub / github.com/egonelbre/exp / UpdateLayout

Method UpdateLayout

dos/ui/render.go:21–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19}
20
21func (form *Form) UpdateLayout() {
22 form.ClientRect = form.BoundsRect
23
24 form.ClientRect.Left = 1
25 form.ClientRect.Top = 3
26 form.ClientRect.Width -= 2
27 form.ClientRect.Height -= 4
28
29 box := form.ClientRect
30 box.Height = 1
31 for _, component := range form.Components {
32 component.Rect = box
33 box.Top += 1
34 }
35}
36
37func (form *Form) Render() {
38 r := Rect{0, 0, form.BoundsRect.Width, form.BoundsRect.Height}

Callers 1

InitMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected