Row active colorscheme fix

pull/133/head
Miguel Mota 3 years ago
parent 96082d9089
commit fa1fdca5e7
No known key found for this signature in database
GPG Key ID: 67EC1161588A00F9

@ -390,7 +390,7 @@ func (ct *Cointop) ShowChartLoader() error {
func (ct *Cointop) ChartWidth() int {
ct.debuglog("chartWidth()")
w := ct.width()
max := 130
max := 175
if w > max {
return max
}

@ -276,10 +276,28 @@ func (c *Colorscheme) color(name string, a ...interface{}) string {
}
func (c *Colorscheme) gocuiFgColor(name string) gocui.Attribute {
var attrs []gocui.Attribute
if v, ok := c.colors[name+"_fg"].(string); ok {
if fg, ok := c.toGocuiAttr(v); ok {
return fg
attrs = append(attrs, fg)
}
}
if v, ok := c.colors[name+"_bold"].(bool); ok {
if v {
attrs = append(attrs, gocui.AttrBold)
}
}
if v, ok := c.colors[name+"_underline"].(bool); ok {
if v {
attrs = append(attrs, gocui.AttrUnderline)
}
}
if len(attrs) > 0 {
var combined gocui.Attribute
for _, v := range attrs {
combined = combined ^ v
}
return combined
}
return gocui.ColorDefault

Loading…
Cancel
Save