Rename gapSize to smallGap

This commit is contained in:
Petar Kapriš 2021-08-27 12:05:06 +02:00 committed by Петар Каприш
parent 357757e479
commit 7dd9ddd810

View file

@ -13,8 +13,8 @@ import (
const ( const (
dayWidth = 2 dayWidth = 2
gapWidth = 1 smallGap = 1
monthWidth = 7*dayWidth + 6*gapWidth monthWidth = 7*dayWidth + 6*smallGap
monthHeight = (31+6+(7-1))/7 + 2 monthHeight = (31+6+(7-1))/7 + 2
) )
@ -88,7 +88,7 @@ func drawMonth(m time.Month, x, y int) {
centeredText(months[m], x, y, monthWidth, wall, defStyle) centeredText(months[m], x, y, monthWidth, wall, defStyle)
for i := 1; i <= 7; i++ { for i := 1; i <= 7; i++ {
centeredText(weekdays[i % 7], x + (i - 1) * (dayWidth + gapWidth), y + 1, dayWidth, wall, defStyle) centeredText(weekdays[i % 7], x + (i - 1) * (dayWidth + smallGap), y + 1, dayWidth, wall, defStyle)
} }
dayNum := date(selTime.Year(), m + 1, 0).Day() dayNum := date(selTime.Year(), m + 1, 0).Day()
@ -100,7 +100,7 @@ func drawMonth(m time.Month, x, y int) {
} }
centeredText( centeredText(
strconv.Itoa(i), strconv.Itoa(i),
x + ((weekday - 1 + 7) % 7) * (dayWidth + gapWidth), x + ((weekday - 1 + 7) % 7) * (dayWidth + smallGap),
y + 2, y + 2,
2, 2,
wall, wall,