(n *views.Node)
| 19 | } |
| 20 | |
| 21 | func (w *UIWindow) drawNode(n *views.Node) { |
| 22 | cs := n.Children() |
| 23 | dividerStyle := config.DefStyle |
| 24 | if style, ok := config.Colorscheme["divider"]; ok { |
| 25 | dividerStyle = style |
| 26 | } |
| 27 | |
| 28 | divchars := config.GetGlobalOption("divchars").(string) |
| 29 | if util.CharacterCountInString(divchars) != 2 { |
| 30 | divchars = "|-" |
| 31 | } |
| 32 | |
| 33 | divchar, combc, _ := util.DecodeCharacterInString(divchars) |
| 34 | |
| 35 | divreverse := config.GetGlobalOption("divreverse").(bool) |
| 36 | if divreverse { |
| 37 | dividerStyle = dividerStyle.Reverse(true) |
| 38 | } |
| 39 | |
| 40 | for i, c := range cs { |
| 41 | if c.Kind == views.STVert { |
| 42 | if i != len(cs)-1 { |
| 43 | for h := 0; h < c.H; h++ { |
| 44 | screen.SetContent(c.X+c.W, c.Y+h, divchar, combc, dividerStyle) |
| 45 | } |
| 46 | } |
| 47 | } |
| 48 | w.drawNode(c) |
| 49 | } |
| 50 | } |
| 51 | |
| 52 | func (w *UIWindow) Display() { |
| 53 | w.drawNode(w.root) |
no test coverage detected