diff --git a/ComposePrefs3/src/main/java/com/jamal/composeprefs3/ui/prefs/ListPref.kt b/ComposePrefs3/src/main/java/com/jamal/composeprefs3/ui/prefs/ListPref.kt index 95f1cb6..a2cb9b8 100644 --- a/ComposePrefs3/src/main/java/com/jamal/composeprefs3/ui/prefs/ListPref.kt +++ b/ComposePrefs3/src/main/java/com/jamal/composeprefs3/ui/prefs/ListPref.kt @@ -34,6 +34,7 @@ import java.lang.Exception * @param contentColor Preferred content color passed to dialog's children * @param textColor Text colour of the [title] and [summary] * @param selectionColor Colour of the radiobutton of the selected item + * @param buttonColor Colour of the cancel button * @param enabled If false, this Pref cannot be clicked and the Dialog cannot be shown. * @param entries Map of keys to values for entries that should be shown in the Dialog. */ @@ -52,6 +53,7 @@ fun ListPref( contentColor: Color = contentColorFor(dialogBackgroundColor), textColor: Color = MaterialTheme.colorScheme.onBackground, selectionColor: Color = MaterialTheme.colorScheme.primary, + buttonColor: Color = MaterialTheme.colorScheme.primary, enabled: Boolean = true, entries: Map = mapOf(), //TODO: Change to List? ) { @@ -135,7 +137,7 @@ fun ListPref( TextButton( onClick = { showDialog = false }, ) { - Text("Cancel", style = MaterialTheme.typography.bodyLarge) + Text("Cancel", style = MaterialTheme.typography.bodyLarge, color = buttonColor) } },