summaryrefslogtreecommitdiffstats
path: root/termui
diff options
context:
space:
mode:
authorCaleb Bassi <calebjbassi@gmail.com>2018-02-25 22:51:51 -0800
committerCaleb Bassi <calebjbassi@gmail.com>2018-02-25 22:51:51 -0800
commit6c1848eea741726641935933582a808c8e430907 (patch)
tree2649b4365035e6a80b021e0634d403aeb9b7be40 /termui
parent21aed4b1eafd6cd28b9deef8084c009c38dd8f5f (diff)
Code cleanup and updated README
Diffstat (limited to 'termui')
-rw-r--r--termui/colors.go2
-rw-r--r--termui/table.go9
2 files changed, 6 insertions, 5 deletions
diff --git a/termui/colors.go b/termui/colors.go
index 2fdacd3..f1de7bf 100644
--- a/termui/colors.go
+++ b/termui/colors.go
@@ -26,7 +26,7 @@ var DefaultTheme = Colorscheme{
BorderBg: -1,
Sparkline: 4,
- LineGraph: -1,
+ LineGraph: 0,
TableCursor: 4,
GaugeColor: 7,
}
diff --git a/termui/table.go b/termui/table.go
index d18bdc6..c5d8909 100644
--- a/termui/table.go
+++ b/termui/table.go
@@ -16,8 +16,8 @@ type Table struct {
UniqueCol int // the column used to identify the selected item
SelectedItem string // used to keep the cursor on the correct item if the data changes
SelectedRow int
- TopRow int // used to indicate where in the table we are scrolled at
- ColResizer func()
+ TopRow int // used to indicate where in the table we are scrolled at
+ ColResizer func() // for widgets that inherit a Table and want to overload the ColResize method
}
// NewTable returns a new Table instance
@@ -104,8 +104,9 @@ func (t *Table) Buffer() *Buffer {
return buf
}
-////////////////////////////////////////////////////////////////////////////////
-// Cursor movement
+/////////////////////////////////////////////////////////////////////////////////
+// Cursor Movement //
+/////////////////////////////////////////////////////////////////////////////////
// calcPos is used to calculate the cursor position and where in the process list we are located.
func (t *Table) calcPos() {