fixing some weekly view calculations

This commit is contained in:
tibbi 2022-03-03 09:38:02 +01:00
parent 2d5b174df9
commit 3bcd394ad0
2 changed files with 3 additions and 2 deletions
app/src/main
kotlin/com/simplemobiletools/calendar/pro/fragments
res/layout

@ -466,8 +466,8 @@ class WeekFragment : Fragment(), WeeklyCalendar {
} }
var endMinutes = startMinutes + duration var endMinutes = startMinutes + duration
if (endMinutes - startMinutes < minimalHeight) { if ((endMinutes - startMinutes) * minuteHeight < minimalHeight) {
endMinutes += Math.round(minimalHeight / minuteHeight) endMinutes = startMinutes + (minimalHeight / minuteHeight).toInt()
} }
val range = Range(startMinutes, endMinutes) val range = Range(startMinutes, endMinutes)

@ -26,6 +26,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:ellipsize="end" android:ellipsize="end"
android:includeFontPadding="false"
android:maxLines="3" android:maxLines="3"
android:paddingStart="@dimen/tiny_margin" android:paddingStart="@dimen/tiny_margin"
android:textColor="@android:color/white" android:textColor="@android:color/white"