fixing some offset glitches at the yearly view

This commit is contained in:
tibbi 2020-05-17 10:38:04 +02:00
parent fbad874f5d
commit 3f9bbb443f
1 changed files with 5 additions and 5 deletions

View File

@ -79,11 +79,11 @@ class SmallMonthView(context: Context, attrs: AttributeSet, defStyle: Int) : Vie
for (y in 1..6) { for (y in 1..6) {
for (x in 1..7) { for (x in 1..7) {
if (curId in 1..days) { if (curId in 1..days) {
canvas.drawText(curId.toString(), x * dayWidth, y * dayWidth, getPaint(curId)) canvas.drawText(curId.toString(), x * dayWidth - (dayWidth / 4), y * dayWidth, getPaint(curId))
if (curId == todaysId) { if (curId == todaysId) {
val dividerConstant = if (isLandscape) 6 else 4 val dividerConstant = if (isLandscape) 6 else 4
canvas.drawCircle(x * dayWidth - dayWidth / dividerConstant, y * dayWidth - dayWidth / dividerConstant, dayWidth * 0.41f, todayCirclePaint) canvas.drawCircle(x * dayWidth - dayWidth / 2, y * dayWidth - dayWidth / dividerConstant, dayWidth * 0.41f, todayCirclePaint)
} }
} }
curId++ curId++