writeExplorerStatus refreshes the small status pane.
(w *text.Text, message string)
| 2738 | |
| 2739 | // writeExplorerStatus refreshes the small status pane. |
| 2740 | func writeExplorerStatus(w *text.Text, message string) error { |
| 2741 | w.Reset() |
| 2742 | rows := []struct { |
| 2743 | k string |
| 2744 | v string |
| 2745 | }{ |
| 2746 | {"Status: ", message + "\n"}, |
| 2747 | {"Catalog: ", "all leaves selectable\n"}, |
| 2748 | {"Preview: ", "right pane swaps live widgets\n"}, |
| 2749 | {"Tip: ", "click tree items to inspect"}, |
| 2750 | } |
| 2751 | for _, row := range rows { |
| 2752 | if err := w.Write(row.k, text.WriteCellOpts(cell.FgColor(cell.ColorNumber(245)))); err != nil { |
| 2753 | return err |
| 2754 | } |
| 2755 | if err := w.Write(row.v, text.WriteCellOpts(cell.FgColor(cell.ColorNumber(252)))); err != nil { |
| 2756 | return err |
| 2757 | } |
| 2758 | } |
| 2759 | return nil |
| 2760 | } |
| 2761 | |
| 2762 | // seedExplorerTimeline gives the Timeline and TimeRangePicker meaningful initial data. |
| 2763 | func seedExplorerTimeline(tl *timeline.Timeline, picker *timeline.TimeRangePicker) { |
no test coverage detected