From aacf61b8499be8cce588736f560cbf669b28d5df Mon Sep 17 00:00:00 2001 From: Nicholas Novak <34256932+NickyBoy89@users.noreply.github.com> Date: Mon, 6 Nov 2023 15:27:03 -0800 Subject: [PATCH] change: Removed some hardcoded border paddings for the tui --- visualization/visualize_chunk.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/visualization/visualize_chunk.go b/visualization/visualize_chunk.go index 9c24efc..0f9bd01 100644 --- a/visualization/visualize_chunk.go +++ b/visualization/visualize_chunk.go @@ -14,8 +14,6 @@ import ( const ( chunkWidth = 15 chunkHeight = 5 - - borderPadding = 2 ) var ( @@ -51,8 +49,9 @@ type chunkViewerModel struct { } func (m *chunkViewerModel) updateShownChunks(newWidth, newHeight int) { - m.visibleChunkRows = newHeight / (chunkHeight + borderPadding) - m.visibleChunkCols = newWidth / (chunkWidth + borderPadding) + horiz, vert := missingChunkStyle.GetFrameSize() + m.visibleChunkRows = newHeight / (chunkHeight + vert) + m.visibleChunkCols = newWidth / (chunkWidth + horiz) } func (m chunkViewerModel) Init() tea.Cmd {