summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCaleb Bassi <calebjbassi@gmail.com>2019-01-14 19:47:44 -0800
committerCaleb Bassi <calebjbassi@gmail.com>2019-01-14 19:47:44 -0800
commitc34782d45f3aae11829f2e430df9925f91519315 (patch)
treeec1cd608a8e0c25009ba42a6fbb6ac3f640662a8 /src
parentc1d7aad1797039cd66e7ef8d3644b6981e3d63d2 (diff)
Upgrade gizak/termui@v3-wip
Diffstat (limited to 'src')
-rw-r--r--src/termui/sparkline.go4
-rw-r--r--src/termui/table.go6
-rw-r--r--src/widgets/statusbar.go6
-rw-r--r--src/widgets/temp.go6
4 files changed, 11 insertions, 11 deletions
diff --git a/src/termui/sparkline.go b/src/termui/sparkline.go
index 4783b86..84cd86e 100644
--- a/src/termui/sparkline.go
+++ b/src/termui/sparkline.go
@@ -57,15 +57,15 @@ func (self *Sparklines) Draw(buf *Buffer) {
if self.Inner.Dy() > 5 {
buf.SetString(
title1,
- image.Pt(self.Inner.Min.X, title1Y),
AttrPair{line.TitleColor | AttrBold, -1},
+ image.Pt(self.Inner.Min.X, title1Y),
)
}
if self.Inner.Dy() > 6 {
buf.SetString(
title2,
- image.Pt(self.Inner.Min.X, title2Y),
AttrPair{line.TitleColor | AttrBold, -1},
+ image.Pt(self.Inner.Min.X, title2Y),
)
}
diff --git a/src/termui/table.go b/src/termui/table.go
index 693bb54..76e87f5 100644
--- a/src/termui/table.go
+++ b/src/termui/table.go
@@ -78,8 +78,8 @@ func (self *Table) Draw(buf *Buffer) {
}
buf.SetString(
h,
- image.Pt(self.Inner.Min.X+self.CellXPos[i]-1, self.Inner.Min.Y),
AttrPair{Theme.Default.Fg | AttrBold, -1},
+ image.Pt(self.Inner.Min.X+self.CellXPos[i]-1, self.Inner.Min.Y),
)
}
@@ -102,8 +102,8 @@ func (self *Table) Draw(buf *Buffer) {
}
buf.SetString(
strings.Repeat(" ", self.Inner.Dx()),
- image.Pt(self.Inner.Min.X, self.Inner.Min.Y+y-1),
AttrPair{fg, -1},
+ image.Pt(self.Inner.Min.X, self.Inner.Min.Y+y-1),
)
}
self.SelectedItem = row[self.UniqueCol]
@@ -123,8 +123,8 @@ func (self *Table) Draw(buf *Buffer) {
r := TrimString(row[i], width)
buf.SetString(
r,
- image.Pt(self.Inner.Min.X+self.CellXPos[i]-1, self.Inner.Min.Y+y-1),
AttrPair{fg, -1},
+ image.Pt(self.Inner.Min.X+self.CellXPos[i]-1, self.Inner.Min.Y+y-1),
)
}
}
diff --git a/src/widgets/statusbar.go b/src/widgets/statusbar.go
index a1b5e20..3e04646 100644
--- a/src/widgets/statusbar.go
+++ b/src/widgets/statusbar.go
@@ -24,27 +24,27 @@ func (self *StatusBar) Draw(buf *ui.Buffer) {
hostname, _ := os.Hostname()
buf.SetString(
hostname,
- image.Pt(self.Inner.Min.X, self.Inner.Min.Y+(self.Inner.Dy()/2)),
ui.AttrPair{ui.Attribute(7), -1},
+ image.Pt(self.Inner.Min.X, self.Inner.Min.Y+(self.Inner.Dy()/2)),
)
t := time.Now()
_time := t.Format("15:04:05")
buf.SetString(
_time,
+ ui.AttrPair{7, -1},
image.Pt(
self.Inner.Min.X+(self.Inner.Dx()/2)-len(_time)/2,
self.Inner.Min.Y+(self.Inner.Dy()/2),
),
- ui.AttrPair{7, -1},
)
buf.SetString(
"gotop",
+ ui.AttrPair{7, -1},
image.Pt(
self.Inner.Max.X-6,
self.Inner.Min.Y+(self.Inner.Dy()/2),
),
- ui.AttrPair{7, -1},
)
}
diff --git a/src/widgets/temp.go b/src/widgets/temp.go
index db3f0e1..9c1b2e9 100644
--- a/src/widgets/temp.go
+++ b/src/widgets/temp.go
@@ -69,20 +69,20 @@ func (self *Temp) Draw(buf *ui.Buffer) {
s := ui.TrimString(key, (self.Inner.Dx() - 4))
buf.SetString(s,
- image.Pt(self.Inner.Min.X, self.Inner.Min.Y+y),
ui.Theme.Default,
+ image.Pt(self.Inner.Min.X, self.Inner.Min.Y+y),
)
if self.Fahrenheit {
buf.SetString(
fmt.Sprintf("%3dF", self.Data[key]),
- image.Pt(self.Inner.Dx()-3, y+1),
ui.AttrPair{fg, -1},
+ image.Pt(self.Inner.Dx()-3, y+1),
)
} else {
buf.SetString(
fmt.Sprintf("%3dC", self.Data[key]),
- image.Pt(self.Inner.Max.X-4, self.Inner.Min.Y+y),
ui.AttrPair{fg, -1},
+ image.Pt(self.Inner.Max.X-4, self.Inner.Min.Y+y),
)
}
}