mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-03-24 04:20:07 +01:00
fix #348, never remove the antialiasing flag of checklist items
This commit is contained in:
parent
c03d7ef5a5
commit
a9066ab343
@ -158,10 +158,10 @@ class ChecklistAdapter(activity: BaseSimpleActivity, var items: ArrayList<Checkl
|
|||||||
gravity = context.config.getTextGravity()
|
gravity = context.config.getTextGravity()
|
||||||
|
|
||||||
if (checklistItem.isDone) {
|
if (checklistItem.isDone) {
|
||||||
paintFlags = Paint.STRIKE_THRU_TEXT_FLAG
|
paintFlags = paintFlags or Paint.STRIKE_THRU_TEXT_FLAG
|
||||||
alpha = DONE_CHECKLIST_ITEM_ALPHA
|
alpha = DONE_CHECKLIST_ITEM_ALPHA
|
||||||
} else {
|
} else {
|
||||||
paintFlags = 0
|
paintFlags = paintFlags or Paint.STRIKE_THRU_TEXT_FLAG - Paint.STRIKE_THRU_TEXT_FLAG
|
||||||
alpha = 1f
|
alpha = 1f
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ class WidgetAdapter(val context: Context, val intent: Intent) : RemoteViewsServi
|
|||||||
setTextColor(checklist_title, widgetNewTextColor)
|
setTextColor(checklist_title, widgetNewTextColor)
|
||||||
setTextSize(checklist_title, textSize)
|
setTextSize(checklist_title, textSize)
|
||||||
|
|
||||||
val paintFlags = if (checklistItem.isDone) Paint.STRIKE_THRU_TEXT_FLAG or Paint.ANTI_ALIAS_FLAG else 0
|
val paintFlags = if (checklistItem.isDone) Paint.STRIKE_THRU_TEXT_FLAG or Paint.ANTI_ALIAS_FLAG else Paint.ANTI_ALIAS_FLAG
|
||||||
setInt(checklist_title, "setPaintFlags", paintFlags)
|
setInt(checklist_title, "setPaintFlags", paintFlags)
|
||||||
|
|
||||||
Intent().apply {
|
Intent().apply {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user