mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 13:35:18 +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,11 +57,17 @@ fun AppTheme(
|
||||
|
||||
val surface = context.getColorFromTheme(R.attr.colorSettingsBackground)
|
||||
|
||||
|
||||
CompositionLocalProvider(LocalExtraColors provides extraColors) {
|
||||
AppCompatTheme(surface = surface) {
|
||||
CompositionLocalProvider(LocalTextSelectionColors provides TextSelectionColors(
|
||||
handleColor = MaterialTheme.colors.secondary,
|
||||
backgroundColor = MaterialTheme.colors.secondary.copy(alpha = 0.5f)
|
||||
)) {
|
||||
content()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
Loading…
Reference in New Issue
Block a user