MCPcopy
hub / github.com/g3n/engine / SetBordersFrom

Method SetBordersFrom

gui/panel.go:363–367  ·  view source on GitHub ↗

SetBordersFrom sets this panel border sizes from the specified RectBounds pointer and recalculates the panel size

(src *RectBounds)

Source from the content-addressed store, hash-verified

361// SetBordersFrom sets this panel border sizes from the specified
362// RectBounds pointer and recalculates the panel size
363func (p *Panel) SetBordersFrom(src *RectBounds) {
364
365 p.borderSizes = *src
366 p.resize(p.calcWidth(), p.calcHeight(), true)
367}
368
369// Borders returns this panel current border sizes
370func (p *Panel) Borders() RectBounds {

Callers 4

applyStyleMethod · 0.80
applyResizerStyleMethod · 0.80
applyStyleMethod · 0.80
SetAttribsMethod · 0.80

Calls 3

resizeMethod · 0.95
calcWidthMethod · 0.95
calcHeightMethod · 0.95

Tested by

no test coverage detected