From d55d2fb3499ab066f1333a9acae67f599e3257d1 Mon Sep 17 00:00:00 2001 From: MohamedRejeb Date: Tue, 20 Aug 2024 17:13:32 +0100 Subject: [PATCH] Refactor DatePickerManager --- .../mohamedrejeb/calf/ui/datepicker/DatePickerManager.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/calf-ui/src/iosMain/kotlin/com/mohamedrejeb/calf/ui/datepicker/DatePickerManager.kt b/calf-ui/src/iosMain/kotlin/com/mohamedrejeb/calf/ui/datepicker/DatePickerManager.kt index 091be65..8cb3af5 100644 --- a/calf-ui/src/iosMain/kotlin/com/mohamedrejeb/calf/ui/datepicker/DatePickerManager.kt +++ b/calf-ui/src/iosMain/kotlin/com/mohamedrejeb/calf/ui/datepicker/DatePickerManager.kt @@ -47,8 +47,8 @@ class DatePickerManager @OptIn(ExperimentalMaterial3Api::class) internal constru ) } - val datePickerWidth = mutableStateOf(0f) - val datePickerHeight = mutableStateOf(0f) + internal val datePickerWidth = mutableStateOf(0f) + internal val datePickerHeight = mutableStateOf(0f) init { val date = @@ -85,13 +85,13 @@ class DatePickerManager @OptIn(ExperimentalMaterial3Api::class) internal constru applyColors(colors) } - fun applyColors(colors: DatePickerColors) { + internal fun applyColors(colors: DatePickerColors) { applyTheme(isDark = !isDark(colors.dayContentColor)) datePicker.tintColor = colors.selectedDayContainerColor.toUIColor() datePicker.backgroundColor = colors.containerColor.toUIColor() } - fun applyTheme(isDark: Boolean) { + internal fun applyTheme(isDark: Boolean) { datePicker.applyTheme(isDark) }