mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-03-15 02:40:17 +01:00
adding an extra large font size
This commit is contained in:
parent
53c88f1ab2
commit
89ddffa3f2
@ -505,7 +505,8 @@ class SettingsActivity : SimpleActivity() {
|
||||
val items = arrayListOf(
|
||||
RadioItem(FONT_SIZE_SMALL, res.getString(R.string.small)),
|
||||
RadioItem(FONT_SIZE_MEDIUM, res.getString(R.string.medium)),
|
||||
RadioItem(FONT_SIZE_LARGE, res.getString(R.string.large)))
|
||||
RadioItem(FONT_SIZE_LARGE, res.getString(R.string.large)),
|
||||
RadioItem(FONT_SIZE_EXTRA_LARGE, res.getString(R.string.extra_large)))
|
||||
|
||||
RadioGroupDialog(this@SettingsActivity, items, config.fontSize) {
|
||||
config.fontSize = it as Int
|
||||
|
@ -517,9 +517,11 @@ fun Context.refreshCalDAVCalendars(ids: String, showToasts: Boolean) {
|
||||
fun Context.getWidgetFontSize() = when (config.fontSize) {
|
||||
FONT_SIZE_SMALL -> getWidgetSmallFontSize()
|
||||
FONT_SIZE_MEDIUM -> getWidgetMediumFontSize()
|
||||
else -> getWidgetLargeFontSize()
|
||||
FONT_SIZE_LARGE -> getWidgetLargeFontSize()
|
||||
else -> getWidgetExtraLargeFontSize()
|
||||
}
|
||||
|
||||
fun Context.getWidgetSmallFontSize() = getWidgetMediumFontSize() - 3f
|
||||
fun Context.getWidgetMediumFontSize() = resources.getDimension(R.dimen.day_text_size) / resources.displayMetrics.density
|
||||
fun Context.getWidgetLargeFontSize() = getWidgetMediumFontSize() + 3f
|
||||
fun Context.getWidgetExtraLargeFontSize() = getWidgetMediumFontSize() + 6f
|
||||
|
Loading…
x
Reference in New Issue
Block a user