From e73b7fcb729a27ebf6d158166d27dc3207619427 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 23 Feb 2021 16:40:34 +0100 Subject: [PATCH] fixing some light theme coloring issues --- .../simplemobiletools/calendar/pro/views/MonthView.kt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/views/MonthView.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/views/MonthView.kt index c9a34de3d..707615521 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/views/MonthView.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/views/MonthView.kt @@ -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 }