Dynamic clock icon: fix incorrect hour hand position

This commit is contained in:
MM20 2023-06-21 20:04:52 +02:00
parent 718dd368db
commit c41a5183c0
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -456,7 +456,7 @@ private fun ClockLayer(
when (sublayer.role) {
ClockSublayerRole.Hour -> {
sublayer.drawable.level = (((hour.value.toInt() - defaultHour + 12) % 12) * 60
+ ((minute.value.toInt() - defaultMinute + 60) % 60))
+ ((minute.value.toInt()) % 60))
}
ClockSublayerRole.Minute -> sublayer.drawable.level = ((minute.value.toInt() - defaultMinute + 60) % 60)
ClockSublayerRole.Second -> sublayer.drawable.level = (((second.value.toInt() - defaultSecond + 60) % 60) * 10)