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

Method applyStyle

gui/tree.go:356–366  ·  view source on GitHub ↗

applyStyles applies the specified style to this tree node

(s *TreeNodeStyle)

Source from the content-addressed store, hash-verified

354
355// applyStyles applies the specified style to this tree node
356func (n *TreeNode) applyStyle(s *TreeNodeStyle) {
357
358 n.Panel.ApplyStyle(&s.PanelStyle)
359 icode := 0
360 if n.expanded {
361 icode = 1
362 }
363 n.icon.SetText(string(s.Icons[icode]))
364 n.icon.SetColor4(&s.FgColor)
365 n.label.SetColor4(&s.FgColor)
366}
367
368// update updates this tree node style
369func (n *TreeNode) update() {

Callers 1

updateMethod · 0.95

Calls 3

ApplyStyleMethod · 0.45
SetTextMethod · 0.45
SetColor4Method · 0.45

Tested by

no test coverage detected