~adnano/astronaut

8e623d17ff34d014565cdc15664f507a48963cf0 — Adnan Maolood a month ago f850985
text: Increase padding
2 files changed, 13 insertions(+), 9 deletions(-)

M browser.go
M text.go
M browser.go => browser.go +5 -1
@@ 195,10 195,14 @@ func (b *Browser) Draw() {
			}

			prefix := "[" + hint.Label + "]"
			x := 1
			if len(prefix) > 3 {
				x = 0
			}
			style := styles.Default.Bold(true).
				Background(tcell.ColorYellow).
				Foreground(tcell.ColorBlack)
			b.tabView.DrawText(0, hint.Y, prefix, style)
			b.tabView.DrawText(x, hint.Y, prefix, style)
		}
	}
}

M text.go => text.go +8 -8
@@ 141,7 141,7 @@ func (t *Text) Update() {
	t.mu.RLock()
	defer t.mu.RUnlock()

	const padding = 4
	const padding = 5
	width, height := t.view.Size()
	width -= padding * 2



@@ 219,7 219,7 @@ func (t *Text) Draw() {

	t.view.Fill(' ', styles.Default)

	const padding = 4
	const padding = 5
	w, h := t.view.Size()
	w -= padding * 2



@@ 235,24 235,24 @@ func (t *Text) Draw() {
		case LineHeading1:
			style = styles.Heading1
			if !line.Wrapped {
				prefix = "  # "
				prefix = "   # "
				pstyle = style
			}
		case LineHeading2:
			style = styles.Heading2
			if !line.Wrapped {
				prefix = " ## "
				prefix = "  ## "
				pstyle = style
			}
		case LineHeading3:
			style = styles.Heading3
			if !line.Wrapped {
				prefix = "### "
				prefix = " ### "
				pstyle = style
			}
		case LineQuote:
			style = styles.Quote
			prefix = "  > "
			prefix = "   > "
			pstyle = style
		case LineLink:
			style = styles.Link


@@ 260,13 260,13 @@ func (t *Text) Draw() {
				style = style.Reverse(true)
			}
			if !line.Wrapped {
				prefix = " => "
				prefix = "  => "
				pstyle = styles.Link.Underline(false)
			}
		case LineListItem:
			style = styles.ListItem
			if !line.Wrapped {
				prefix = "  • "
				prefix = "   • "
				pstyle = style
			}
		case LineText: