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

Method applyStyle

gui/window.go:264–274  ·  view source on GitHub ↗

applyStyle applies a window style to the window.

(s *WindowStyle)

Source from the content-addressed store, hash-verified

262
263// applyStyle applies a window style to the window.
264func (w *Window) applyStyle(s *WindowStyle) {
265
266 w.SetBordersColor4(&s.BorderColor)
267 w.SetBordersFrom(&s.Border)
268 w.SetPaddingsFrom(&s.Padding)
269 w.client.SetMarginsFrom(&s.Margin)
270 w.client.SetColor4(&s.BgColor)
271 if w.title != nil {
272 w.title.applyStyle(&s.TitleStyle)
273 }
274}
275
276// recalc recalculates the sizes and positions of the internal panels
277// from the outside to the inside.

Callers 1

updateMethod · 0.95

Calls 5

SetBordersColor4Method · 0.80
SetBordersFromMethod · 0.80
SetPaddingsFromMethod · 0.80
SetMarginsFromMethod · 0.80
SetColor4Method · 0.45

Tested by

no test coverage detected