increase the alpha of dimmed events at the monthly view
This commit is contained in:
parent
712cafbee8
commit
3449a5a0f5
|
@ -14,6 +14,7 @@ import com.simplemobiletools.calendar.pro.extensions.config
|
|||
import com.simplemobiletools.calendar.pro.extensions.seconds
|
||||
import com.simplemobiletools.calendar.pro.helpers.Formatter
|
||||
import com.simplemobiletools.calendar.pro.helpers.LOW_ALPHA
|
||||
import com.simplemobiletools.calendar.pro.helpers.MEDIUM_ALPHA
|
||||
import com.simplemobiletools.calendar.pro.models.DayMonthly
|
||||
import com.simplemobiletools.calendar.pro.models.Event
|
||||
import com.simplemobiletools.calendar.pro.models.MonthViewEvent
|
||||
|
@ -257,7 +258,7 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
|
|||
}
|
||||
|
||||
if (!startDay.isThisMonth) {
|
||||
paintColor = paintColor.adjustAlpha(LOW_ALPHA)
|
||||
paintColor = paintColor.adjustAlpha(MEDIUM_ALPHA)
|
||||
}
|
||||
|
||||
return getColoredPaint(paintColor)
|
||||
|
@ -272,7 +273,7 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
|
|||
private fun getEventBackgroundColor(event: MonthViewEvent, startDay: DayMonthly, endDay: DayMonthly): Paint {
|
||||
var paintColor = event.color
|
||||
if ((!startDay.isThisMonth && !endDay.isThisMonth) || (dimPastEvents && event.isPastEvent)) {
|
||||
paintColor = paintColor.adjustAlpha(LOW_ALPHA)
|
||||
paintColor = paintColor.adjustAlpha(MEDIUM_ALPHA)
|
||||
}
|
||||
|
||||
return getColoredPaint(paintColor)
|
||||
|
@ -281,7 +282,7 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
|
|||
private fun getEventTitlePaint(event: MonthViewEvent, startDay: DayMonthly, endDay: DayMonthly): Paint {
|
||||
var paintColor = event.color.getContrastColor()
|
||||
if ((!startDay.isThisMonth && !endDay.isThisMonth) || (dimPastEvents && event.isPastEvent)) {
|
||||
paintColor = paintColor.adjustAlpha(LOW_ALPHA)
|
||||
paintColor = paintColor.adjustAlpha(MEDIUM_ALPHA)
|
||||
}
|
||||
|
||||
val curPaint = Paint(eventTitlePaint)
|
||||
|
@ -293,7 +294,7 @@ class MonthView(context: Context, attrs: AttributeSet, defStyle: Int) : View(con
|
|||
val curPaint = Paint(paint)
|
||||
var paintColor = primaryColor
|
||||
if (!day.isThisMonth) {
|
||||
paintColor = paintColor.adjustAlpha(LOW_ALPHA)
|
||||
paintColor = paintColor.adjustAlpha(MEDIUM_ALPHA)
|
||||
}
|
||||
curPaint.color = paintColor
|
||||
return curPaint
|
||||
|
|
Loading…
Reference in New Issue