mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
Add text selection colors
This commit is contained in:
parent
c72f37a9ac
commit
eb98ce961c
@ -80,7 +80,7 @@ fun destructiveButtonColors() = ButtonDefaults.buttonColors(backgroundColor = Co
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
fun Context.PreviewMessageDetails(
|
||||
fun PreviewMessageDetails(
|
||||
@PreviewParameter(ThemeResPreviewParameterProvider::class) themeResId: Int
|
||||
) {
|
||||
PreviewTheme(themeResId) {
|
||||
@ -127,6 +127,5 @@ fun outlinedTextFieldColors(
|
||||
textColor = if (isError) colorDestructive else LocalContentColor.current.copy(LocalContentAlpha.current),
|
||||
focusedBorderColor = Color(classicDark3),
|
||||
unfocusedBorderColor = Color(classicDark3),
|
||||
cursorColor = LocalContentColor.current,
|
||||
placeholderColor = if (isError) colorDestructive else MaterialTheme.colors.onSurface.copy(ContentAlpha.medium)
|
||||
)
|
||||
|
@ -5,6 +5,8 @@ import androidx.annotation.AttrRes
|
||||
import androidx.appcompat.view.ContextThemeWrapper
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.text.selection.LocalTextSelectionColors
|
||||
import androidx.compose.foundation.text.selection.TextSelectionColors
|
||||
import androidx.compose.material.LocalContentColor
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.Shapes
|
||||
@ -55,9 +57,15 @@ fun AppTheme(
|
||||
|
||||
val surface = context.getColorFromTheme(R.attr.colorSettingsBackground)
|
||||
|
||||
|
||||
CompositionLocalProvider(LocalExtraColors provides extraColors) {
|
||||
AppCompatTheme(surface = surface) {
|
||||
content()
|
||||
CompositionLocalProvider(LocalTextSelectionColors provides TextSelectionColors(
|
||||
handleColor = MaterialTheme.colors.secondary,
|
||||
backgroundColor = MaterialTheme.colors.secondary.copy(alpha = 0.5f)
|
||||
)) {
|
||||
content()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user