mirror of https://github.com/mum4k/termdash.git
Fix formatting issues.
This commit is contained in:
parent
22ae449020
commit
f8470e7dfe
|
@ -1003,7 +1003,7 @@ func TestNew(t *testing.T) {
|
|||
return ft
|
||||
},
|
||||
},
|
||||
{
|
||||
{
|
||||
desc: "sets border title on root container of different color",
|
||||
termSize: image.Point{10, 10},
|
||||
container: func(ft *faketerm.Terminal) (*Container, error) {
|
||||
|
@ -1065,9 +1065,9 @@ func TestNew(t *testing.T) {
|
|||
SplitVertical(
|
||||
Left(
|
||||
Border(linestyle.Light),
|
||||
BorderTitle("Ab"),
|
||||
TitleColor(cell.ColorMagenta),
|
||||
TitleFocusedColor(cell.ColorCyan),
|
||||
BorderTitle("Ab"),
|
||||
TitleColor(cell.ColorMagenta),
|
||||
TitleFocusedColor(cell.ColorCyan),
|
||||
),
|
||||
Right(
|
||||
Border(linestyle.Light),
|
||||
|
@ -1103,7 +1103,6 @@ func TestNew(t *testing.T) {
|
|||
return ft
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
desc: "inherits title color on left child container",
|
||||
termSize: image.Point{10, 10},
|
||||
|
@ -1116,7 +1115,7 @@ func TestNew(t *testing.T) {
|
|||
SplitVertical(
|
||||
Left(
|
||||
Border(linestyle.Light),
|
||||
BorderTitle("Ab"),
|
||||
BorderTitle("Ab"),
|
||||
),
|
||||
Right(
|
||||
Border(linestyle.Light),
|
||||
|
|
|
@ -87,19 +87,19 @@ func drawBorder(c *Container) error {
|
|||
var cOpts, titleCOpts []cell.Option
|
||||
if c.focusTracker.isActive(c) {
|
||||
cOpts = append(cOpts, cell.FgColor(c.opts.inherited.focusedColor))
|
||||
if c.opts.inherited.titleFocusedColor != nil {
|
||||
if c.opts.inherited.titleFocusedColor != nil {
|
||||
titleCOpts = append(titleCOpts, cell.FgColor(*c.opts.inherited.titleFocusedColor))
|
||||
} else {
|
||||
} else {
|
||||
titleCOpts = cOpts
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
cOpts = append(cOpts, cell.FgColor(c.opts.inherited.borderColor))
|
||||
if c.opts.inherited.titleColor != nil {
|
||||
if c.opts.inherited.titleColor != nil {
|
||||
titleCOpts = append(titleCOpts, cell.FgColor(*c.opts.inherited.titleColor))
|
||||
} else {
|
||||
} else {
|
||||
titleCOpts = cOpts
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if err := draw.Border(cvs, ar,
|
||||
draw.BorderLineStyle(c.opts.border),
|
||||
|
|
Loading…
Reference in New Issue