diff options
Diffstat (limited to 'src/tui')
| -rw-r--r-- | src/tui/dummy.go | 4 | ||||
| -rw-r--r-- | src/tui/tui.go | 10 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/tui/dummy.go b/src/tui/dummy.go index a49677c6..aaa9a7ea 100644 --- a/src/tui/dummy.go +++ b/src/tui/dummy.go @@ -11,6 +11,10 @@ func HasFullscreenRenderer() bool { var DefaultBorderShape = BorderRounded func (a Attr) Merge(b Attr) Attr { + if b == AttrRegular { + return b + } + return a | b } diff --git a/src/tui/tui.go b/src/tui/tui.go index 0ab4874b..921c7a04 100644 --- a/src/tui/tui.go +++ b/src/tui/tui.go @@ -205,6 +205,10 @@ type ColorAttr struct { Attr Attr } +func (a ColorAttr) IsColorDefined() bool { + return a.Color != colUndefined +} + func NewColorAttr() ColorAttr { return ColorAttr{Color: colUndefined, Attr: AttrUndefined} } @@ -305,6 +309,7 @@ type ColorTheme struct { Bg ColorAttr ListFg ColorAttr ListBg ColorAttr + Nth ColorAttr SelectedFg ColorAttr SelectedBg ColorAttr SelectedMatch ColorAttr @@ -703,6 +708,7 @@ func EmptyTheme() *ColorTheme { HeaderBg: ColorAttr{colUndefined, AttrUndefined}, HeaderBorder: ColorAttr{colUndefined, AttrUndefined}, HeaderLabel: ColorAttr{colUndefined, AttrUndefined}, + Nth: ColorAttr{colUndefined, AttrUndefined}, } } @@ -746,6 +752,7 @@ func NoColorTheme() *ColorTheme { HeaderBg: ColorAttr{colDefault, AttrUndefined}, HeaderBorder: ColorAttr{colDefault, AttrUndefined}, HeaderLabel: ColorAttr{colDefault, AttrUndefined}, + Nth: ColorAttr{colUndefined, AttrUndefined}, } } @@ -786,6 +793,7 @@ func init() { InputBg: ColorAttr{colUndefined, AttrUndefined}, InputBorder: ColorAttr{colUndefined, AttrUndefined}, InputLabel: ColorAttr{colUndefined, AttrUndefined}, + Nth: ColorAttr{colUndefined, AttrUndefined}, } Dark256 = &ColorTheme{ Colored: true, @@ -823,6 +831,7 @@ func init() { InputBg: ColorAttr{colUndefined, AttrUndefined}, InputBorder: ColorAttr{colUndefined, AttrUndefined}, InputLabel: ColorAttr{colUndefined, AttrUndefined}, + Nth: ColorAttr{colUndefined, AttrUndefined}, } Light256 = &ColorTheme{ Colored: true, @@ -863,6 +872,7 @@ func init() { HeaderBg: ColorAttr{colUndefined, AttrUndefined}, HeaderBorder: ColorAttr{colUndefined, AttrUndefined}, HeaderLabel: ColorAttr{colUndefined, AttrUndefined}, + Nth: ColorAttr{colUndefined, AttrUndefined}, } } |
