Skip to content

Commit

Permalink
Refactor DatePickerManager
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedRejeb committed Aug 20, 2024
1 parent 8c82f07 commit d55d2fb
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit d55d2fb

Please sign in to comment.