MCPcopy Create free account
hub / github.com/cogentcore/core / setFileIcon

Method setFileIcon

filetree/node.go:339–351  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

337}
338
339func (fn *Node) setFileIcon() {
340 ic, hasic := fn.Info.FindIcon()
341 if !hasic {
342 ic = icons.Blank
343 }
344 fn.IconLeaf = ic
345 if br := fn.Branch; br != nil {
346 if br.IconIndeterminate != ic {
347 br.SetIconOn(icons.FolderOpen).SetIconOff(icons.Folder).SetIconIndeterminate(ic)
348 br.UpdateTree()
349 }
350 }
351}
352
353// initFileInfo initializes file info
354func (fn *Node) initFileInfo() error {

Callers 1

InitMethod · 0.95

Calls 5

FindIconMethod · 0.80
SetIconIndeterminateMethod · 0.80
SetIconOffMethod · 0.80
SetIconOnMethod · 0.80
UpdateTreeMethod · 0.80

Tested by

no test coverage detected