Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solution for Circle visual overlay not centered in year view #2258 #2261

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,25 @@ class SmallMonthView(context: Context, attrs: AttributeSet, defStyle: Int) : Vie
canvas.drawText(curId.toString(), x * dayWidth - (dayWidth / 4), y * dayWidth, paint)

if (curId == todaysId && !isPrintVersion) {
val dividerConstant = if (isLandscape) 6 else 4
canvas.drawCircle(x * dayWidth - dayWidth / 2, y * dayWidth - dayWidth / dividerConstant, dayWidth * 0.41f, todayCirclePaint)
val array_1_to_9= listOf(1, 2, 3, 4, 5,6,7,8,9)
val array_10_to_19= listOf(10, 11, 12, 13, 14,15,16,17,18,19)

if(todaysId in array_1_to_9){
val dividerConstantX = if (isLandscape) 2.6f else 2.8f
val dividerConstantY = if (isLandscape) 6.0f else 5.1f
canvas.drawCircle(x * dayWidth - dayWidth / dividerConstantX, y * dayWidth - dayWidth / dividerConstantY, dayWidth * 0.41f, todayCirclePaint)
}else if (todaysId in array_10_to_19){
val dividerConstantX = if (isLandscape) 2.0f else 2.1f
val dividerConstantY = if (isLandscape) 6.0f else 5.2f
canvas.drawCircle(x * dayWidth - dayWidth / dividerConstantX, y * dayWidth - dayWidth / dividerConstantY, dayWidth * 0.41f, todayCirclePaint)

}else {
val dividerConstantX = if (isLandscape) 2.0f else 2.0f
val dividerConstantY = if (isLandscape) 6.0f else 5.4f
canvas.drawCircle(x * dayWidth - dayWidth / dividerConstantX, y * dayWidth - dayWidth / dividerConstantY, dayWidth * 0.41f, todayCirclePaint)
}


}
}
curId++
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
<string name="add_holidays">Ajouter des jours fériés</string>
<string name="national_holidays">Jours fériés nationaux</string>
<string name="religious_holidays">Jours fériés religieux</string>
<string name="holidays_imported_successfully">Les jours fériés ont été correctement importés dans le type d'évènement \'Jours fériés\'</string>
<string name="holidays_imported_successfully">Les jours fériés ont été correctement importés dans le type d\'évènement \'Jours fériés\'</string>
<string name="importing_some_holidays_failed">L\'importation de certains évènements a échoué</string>
<string name="importing_holidays_failed">L\'importation des jours fériés a échoué</string>
<!-- Settings -->
Expand Down