change: Removed some hardcoded border paddings for the tui
This commit is contained in:
parent
f398ea24d1
commit
aacf61b849
@ -14,8 +14,6 @@ import (
|
|||||||
const (
|
const (
|
||||||
chunkWidth = 15
|
chunkWidth = 15
|
||||||
chunkHeight = 5
|
chunkHeight = 5
|
||||||
|
|
||||||
borderPadding = 2
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -51,8 +49,9 @@ type chunkViewerModel struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *chunkViewerModel) updateShownChunks(newWidth, newHeight int) {
|
func (m *chunkViewerModel) updateShownChunks(newWidth, newHeight int) {
|
||||||
m.visibleChunkRows = newHeight / (chunkHeight + borderPadding)
|
horiz, vert := missingChunkStyle.GetFrameSize()
|
||||||
m.visibleChunkCols = newWidth / (chunkWidth + borderPadding)
|
m.visibleChunkRows = newHeight / (chunkHeight + vert)
|
||||||
|
m.visibleChunkCols = newWidth / (chunkWidth + horiz)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m chunkViewerModel) Init() tea.Cmd {
|
func (m chunkViewerModel) Init() tea.Cmd {
|
||||||
|
Loading…
Reference in New Issue
Block a user