|
|
|
@ -727,7 +727,7 @@ func (t *Terminal) environ() []string {
|
|
|
|
|
|
|
|
|
|
func borderLines(shape tui.BorderShape) int {
|
|
|
|
|
switch shape {
|
|
|
|
|
case tui.BorderHorizontal, tui.BorderRounded, tui.BorderSharp, tui.BorderBold, tui.BorderBlock, tui.BorderDouble:
|
|
|
|
|
case tui.BorderHorizontal, tui.BorderRounded, tui.BorderSharp, tui.BorderBold, tui.BorderBlock, tui.BorderThinBlock, tui.BorderDouble:
|
|
|
|
|
return 2
|
|
|
|
|
case tui.BorderTop, tui.BorderBottom:
|
|
|
|
|
return 1
|
|
|
|
@ -1085,7 +1085,7 @@ func (t *Terminal) adjustMarginAndPadding() (int, int, [4]int, [4]int) {
|
|
|
|
|
if idx == 3 {
|
|
|
|
|
extraMargin[idx] += 1 + bw
|
|
|
|
|
}
|
|
|
|
|
case tui.BorderRounded, tui.BorderSharp, tui.BorderBold, tui.BorderBlock, tui.BorderDouble:
|
|
|
|
|
case tui.BorderRounded, tui.BorderSharp, tui.BorderBold, tui.BorderBlock, tui.BorderThinBlock, tui.BorderDouble:
|
|
|
|
|
extraMargin[idx] += 1 + bw*(idx%2)
|
|
|
|
|
}
|
|
|
|
|
marginInt[idx] = sizeSpecToInt(idx, sizeSpec) + extraMargin[idx]
|
|
|
|
@ -1178,7 +1178,7 @@ func (t *Terminal) resizeWindows(forcePreview bool) {
|
|
|
|
|
t.border = t.tui.NewWindow(
|
|
|
|
|
marginInt[0], marginInt[3], width+(1+bw), height,
|
|
|
|
|
false, tui.MakeBorderStyle(tui.BorderRight, t.unicode))
|
|
|
|
|
case tui.BorderRounded, tui.BorderSharp, tui.BorderBold, tui.BorderBlock, tui.BorderDouble:
|
|
|
|
|
case tui.BorderRounded, tui.BorderSharp, tui.BorderBold, tui.BorderBlock, tui.BorderThinBlock, tui.BorderDouble:
|
|
|
|
|
t.border = t.tui.NewWindow(
|
|
|
|
|
marginInt[0]-1, marginInt[3]-(1+bw), width+(1+bw)*2, height+2,
|
|
|
|
|
false, tui.MakeBorderStyle(t.borderShape, t.unicode))
|
|
|
|
@ -1212,7 +1212,7 @@ func (t *Terminal) resizeWindows(forcePreview bool) {
|
|
|
|
|
}
|
|
|
|
|
t.pborder = t.tui.NewWindow(y, x, w, h, true, previewBorder)
|
|
|
|
|
switch previewOpts.border {
|
|
|
|
|
case tui.BorderSharp, tui.BorderRounded, tui.BorderBold, tui.BorderBlock, tui.BorderDouble:
|
|
|
|
|
case tui.BorderSharp, tui.BorderRounded, tui.BorderBold, tui.BorderBlock, tui.BorderThinBlock, tui.BorderDouble:
|
|
|
|
|
pwidth -= (1 + bw) * 2
|
|
|
|
|
pheight -= 2
|
|
|
|
|
x += 1 + bw
|
|
|
|
@ -1356,7 +1356,7 @@ func (t *Terminal) printLabel(window tui.Window, render labelPrinter, opts label
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch borderShape {
|
|
|
|
|
case tui.BorderHorizontal, tui.BorderTop, tui.BorderBottom, tui.BorderRounded, tui.BorderSharp, tui.BorderBold, tui.BorderBlock, tui.BorderDouble:
|
|
|
|
|
case tui.BorderHorizontal, tui.BorderTop, tui.BorderBottom, tui.BorderRounded, tui.BorderSharp, tui.BorderBold, tui.BorderBlock, tui.BorderThinBlock, tui.BorderDouble:
|
|
|
|
|
if redrawBorder {
|
|
|
|
|
window.DrawHBorder()
|
|
|
|
|
}
|
|
|
|
|