fixing some light theme coloring issues

This commit is contained in:
tibbi 2021-02-23 16:40:34 +01:00
parent 92342d927c
commit e73b7fcb72
1 changed files with 8 additions and 2 deletions

View File

@ -155,8 +155,12 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
val xPosCenter = xPos + dayWidth / 2
val dayNumber = day.value.toString()
val textPaint = getTextPaint(day)
if (selectedDayCoords.x != -1 && x == selectedDayCoords.x && y == selectedDayCoords.y) {
canvas.drawCircle(xPosCenter, yPos + textPaint.textSize * 0.7f, textPaint.textSize * 0.8f, circleStrokePaint)
if (day.isToday) {
textPaint.color = textColor
}
} else if (day.isToday && !isPrintVersion) {
canvas.drawCircle(xPosCenter, yPos + textPaint.textSize * 0.7f, textPaint.textSize * 0.8f, getCirclePaint(day))
}
@ -168,7 +172,7 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
canvas.drawCircle(xPosCenter, yPos + height + textPaint.textSize / 2, textPaint.textSize * 0.15f, getDayEventColor(day.dayEvents.first()))
}
canvas.drawText(dayNumber, xPosCenter, yPos + textPaint.textSize, getTextPaint(day))
canvas.drawText(dayNumber, xPosCenter, yPos + textPaint.textSize, textPaint)
dayVerticalOffsets.put(day.indexOnMonthView, (verticalOffset + textPaint.textSize * 2).toInt())
}
curId++
@ -245,7 +249,9 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
val xPosCenter = xPos + dayWidth / 2
if (verticalOffset - eventTitleHeight * 2 > dayHeight) {
canvas.drawText("...", xPosCenter, yPos + verticalOffset - eventTitleHeight / 2, getTextPaint(days[event.startDayIndex]))
val paint = getTextPaint(days[event.startDayIndex])
paint.color = textColor
canvas.drawText("...", xPosCenter, yPos + verticalOffset - eventTitleHeight / 2, paint)
return
}