fixing some light theme coloring issues
This commit is contained in:
parent
92342d927c
commit
e73b7fcb72
|
@ -155,8 +155,12 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
|
||||||
val xPosCenter = xPos + dayWidth / 2
|
val xPosCenter = xPos + dayWidth / 2
|
||||||
val dayNumber = day.value.toString()
|
val dayNumber = day.value.toString()
|
||||||
|
|
||||||
|
val textPaint = getTextPaint(day)
|
||||||
if (selectedDayCoords.x != -1 && x == selectedDayCoords.x && y == selectedDayCoords.y) {
|
if (selectedDayCoords.x != -1 && x == selectedDayCoords.x && y == selectedDayCoords.y) {
|
||||||
canvas.drawCircle(xPosCenter, yPos + textPaint.textSize * 0.7f, textPaint.textSize * 0.8f, circleStrokePaint)
|
canvas.drawCircle(xPosCenter, yPos + textPaint.textSize * 0.7f, textPaint.textSize * 0.8f, circleStrokePaint)
|
||||||
|
if (day.isToday) {
|
||||||
|
textPaint.color = textColor
|
||||||
|
}
|
||||||
} else if (day.isToday && !isPrintVersion) {
|
} else if (day.isToday && !isPrintVersion) {
|
||||||
canvas.drawCircle(xPosCenter, yPos + textPaint.textSize * 0.7f, textPaint.textSize * 0.8f, getCirclePaint(day))
|
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.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())
|
dayVerticalOffsets.put(day.indexOnMonthView, (verticalOffset + textPaint.textSize * 2).toInt())
|
||||||
}
|
}
|
||||||
curId++
|
curId++
|
||||||
|
@ -245,7 +249,9 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
|
||||||
val xPosCenter = xPos + dayWidth / 2
|
val xPosCenter = xPos + dayWidth / 2
|
||||||
|
|
||||||
if (verticalOffset - eventTitleHeight * 2 > dayHeight) {
|
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
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue