|
|
|
@ -37,9 +37,9 @@ import org.isoron.uhabits.core.models.Entry.Companion.YES_AUTO
|
|
|
|
|
import org.isoron.uhabits.core.models.Entry.Companion.YES_MANUAL
|
|
|
|
|
import org.isoron.uhabits.core.preferences.Preferences
|
|
|
|
|
import org.isoron.uhabits.inject.ActivityContext
|
|
|
|
|
import org.isoron.uhabits.utils.dim
|
|
|
|
|
import org.isoron.uhabits.utils.getFontAwesome
|
|
|
|
|
import org.isoron.uhabits.utils.showMessage
|
|
|
|
|
import org.isoron.uhabits.utils.sp
|
|
|
|
|
import org.isoron.uhabits.utils.sres
|
|
|
|
|
import org.isoron.uhabits.utils.toMeasureSpec
|
|
|
|
|
import javax.inject.Inject
|
|
|
|
@ -145,6 +145,11 @@ class CheckmarkButtonView(
|
|
|
|
|
}
|
|
|
|
|
else -> R.string.fa_check
|
|
|
|
|
}
|
|
|
|
|
paint.textSize = when {
|
|
|
|
|
id == R.string.fa_question -> sp(12.0f)
|
|
|
|
|
value == YES_AUTO -> sp(13.0f)
|
|
|
|
|
else -> sp(14.0f)
|
|
|
|
|
}
|
|
|
|
|
if (value == YES_AUTO) {
|
|
|
|
|
paint.strokeWidth = 5f
|
|
|
|
|
paint.style = Paint.Style.STROKE
|
|
|
|
@ -153,11 +158,6 @@ class CheckmarkButtonView(
|
|
|
|
|
paint.style = Paint.Style.FILL
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
paint.textSize = when (id) {
|
|
|
|
|
UNKNOWN -> dim(R.dimen.smallerTextSize)
|
|
|
|
|
else -> dim(R.dimen.smallTextSize)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
val label = resources.getString(id)
|
|
|
|
|
val em = paint.measureText("m")
|
|
|
|
|
|
|
|
|
|