mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
fixing some event list related coloring issues
This commit is contained in:
@ -173,7 +173,7 @@ class EventListAdapter(activity: SimpleActivity, var listItems: ArrayList<ListIt
|
|||||||
var endTextColor = textColor
|
var endTextColor = textColor
|
||||||
if (listEvent.isAllDay || listEvent.startTS <= now && listEvent.endTS <= now) {
|
if (listEvent.isAllDay || listEvent.startTS <= now && listEvent.endTS <= now) {
|
||||||
if (listEvent.isAllDay && Formatter.getDayCodeFromTS(listEvent.startTS) == Formatter.getDayCodeFromTS(now) && !isPrintVersion) {
|
if (listEvent.isAllDay && Formatter.getDayCodeFromTS(listEvent.startTS) == Formatter.getDayCodeFromTS(now) && !isPrintVersion) {
|
||||||
startTextColor = primaryColor
|
startTextColor = adjustedPrimaryColor
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dimPastEvents && listEvent.isPastEvent && !isPrintVersion) {
|
if (dimPastEvents && listEvent.isPastEvent && !isPrintVersion) {
|
||||||
@ -181,7 +181,7 @@ class EventListAdapter(activity: SimpleActivity, var listItems: ArrayList<ListIt
|
|||||||
endTextColor = endTextColor.adjustAlpha(LOW_ALPHA)
|
endTextColor = endTextColor.adjustAlpha(LOW_ALPHA)
|
||||||
}
|
}
|
||||||
} else if (listEvent.startTS <= now && listEvent.endTS >= now && !isPrintVersion) {
|
} else if (listEvent.startTS <= now && listEvent.endTS >= now && !isPrintVersion) {
|
||||||
startTextColor = primaryColor
|
startTextColor = adjustedPrimaryColor
|
||||||
}
|
}
|
||||||
|
|
||||||
event_item_start.setTextColor(startTextColor)
|
event_item_start.setTextColor(startTextColor)
|
||||||
@ -195,7 +195,7 @@ class EventListAdapter(activity: SimpleActivity, var listItems: ArrayList<ListIt
|
|||||||
view.event_section_title.apply {
|
view.event_section_title.apply {
|
||||||
text = listSection.title
|
text = listSection.title
|
||||||
setCompoundDrawablesWithIntrinsicBounds(null, if (position == 0) null else topDivider, null, null)
|
setCompoundDrawablesWithIntrinsicBounds(null, if (position == 0) null else topDivider, null, null)
|
||||||
var color = if (listSection.isToday && !isPrintVersion) primaryColor else textColor
|
var color = if (listSection.isToday && !isPrintVersion) adjustedPrimaryColor else textColor
|
||||||
if (dimPastEvents && listSection.isPastSection && !isPrintVersion) {
|
if (dimPastEvents && listSection.isPastSection && !isPrintVersion) {
|
||||||
color = color.adjustAlpha(LOW_ALPHA)
|
color = color.adjustAlpha(LOW_ALPHA)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user