mirror of
https://github.com/oxen-io/session-android.git
synced 2025-01-11 22:33:38 +00:00
Fix ocean dark
This commit is contained in:
parent
f7396503b2
commit
f97630e38a
@ -20,6 +20,7 @@ import androidx.compose.ui.unit.dp
|
||||
import network.loki.messenger.R
|
||||
import network.loki.messenger.libsession_util.util.ExpiryMode
|
||||
import org.thoughtcrime.securesms.ui.Callbacks
|
||||
import org.thoughtcrime.securesms.ui.LocalColors
|
||||
import org.thoughtcrime.securesms.ui.NoOpCallbacks
|
||||
import org.thoughtcrime.securesms.ui.OptionsCard
|
||||
import org.thoughtcrime.securesms.ui.RadioOption
|
||||
@ -56,7 +57,7 @@ fun DisappearingMessages(
|
||||
text = stringResource(R.string.activity_disappearing_messages_group_footer),
|
||||
style = MaterialTheme.typography.extraSmall,
|
||||
fontWeight = FontWeight(400),
|
||||
color = Color(0xFFA1A2A1),
|
||||
color = LocalColors.current.textSecondary,
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier.fillMaxWidth())
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ import androidx.compose.material.Icon
|
||||
import androidx.compose.material.LocalContentColor
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.RadioButton
|
||||
import androidx.compose.material.RadioButtonDefaults
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.material.TextButton
|
||||
import androidx.compose.runtime.Composable
|
||||
@ -223,6 +224,7 @@ fun CellWithPaddingAndMargin(
|
||||
|
||||
@Composable
|
||||
fun <T> TitledRadioButton(option: RadioOption<T>, onClick: () -> Unit) {
|
||||
val color = if (option.enabled) LocalColors.current.text else LocalColors.current.disabled
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(16.dp),
|
||||
modifier = Modifier
|
||||
@ -238,13 +240,13 @@ fun <T> TitledRadioButton(option: RadioOption<T>, onClick: () -> Unit) {
|
||||
Text(
|
||||
text = option.title(),
|
||||
style = MaterialTheme.typography.large,
|
||||
modifier = Modifier.alpha(if (option.enabled) 1f else 0.5f)
|
||||
color = color
|
||||
)
|
||||
option.subtitle?.let {
|
||||
Text(
|
||||
text = it(),
|
||||
style = MaterialTheme.typography.extraSmall,
|
||||
modifier = Modifier.alpha(if (option.enabled) 1f else 0.5f)
|
||||
color = color
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -252,10 +254,11 @@ fun <T> TitledRadioButton(option: RadioOption<T>, onClick: () -> Unit) {
|
||||
RadioButton(
|
||||
selected = option.selected,
|
||||
onClick = null,
|
||||
enabled = option.enabled,
|
||||
modifier = Modifier
|
||||
.height(26.dp)
|
||||
.align(Alignment.CenterVertically)
|
||||
.align(Alignment.CenterVertically),
|
||||
enabled = option.enabled,
|
||||
colors = LocalColors.current.radioButtonColors()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ import androidx.compose.foundation.text.selection.TextSelectionColors
|
||||
import androidx.compose.material.Colors
|
||||
import androidx.compose.material.LocalContentColor
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.RadioButtonDefaults
|
||||
import androidx.compose.material.Shapes
|
||||
import androidx.compose.material.TabRowDefaults
|
||||
import androidx.compose.material.Typography
|
||||
@ -74,6 +75,7 @@ data class SessionColors(
|
||||
val button get() = if (isLight) text else primary
|
||||
val divider get() = text.copy(alpha = TabRowDefaults.DividerOpacity)
|
||||
val backgroundBubbleSent get() = primary
|
||||
@Composable fun radioButtonColors() = RadioButtonDefaults.colors(selectedColor = primary, unselectedColor = text, disabledColor = disabled)
|
||||
}
|
||||
|
||||
val primaryGreen = Color(0xFF31F196)
|
||||
@ -119,7 +121,7 @@ private fun sessionColors(
|
||||
disabled = if (isLight) disabledLioht else disabledDark,
|
||||
background = listOf(Color.Black, Color.White, oceanDarkColors[2], oceanLightColors[7])[index],
|
||||
backgroundSecondary = listOf(classicDarkColors[1], classicLightColors[5], oceanDarkColors[1], oceanLightColors[6])[index],
|
||||
text = listOf(Color.White, Color.Black, oceanDarkColors[1], oceanLightColors[1])[index],
|
||||
text = listOf(Color.White, Color.Black, Color.White, oceanLightColors[1])[index],
|
||||
textSecondary = listOf(classicDarkColors[5], classicLightColors[1], oceanDarkColors[5], oceanLightColors[2])[index],
|
||||
borders = listOf(classicDarkColors[3], classicLightColors[3], oceanDarkColors[4], oceanLightColors[3])[index],
|
||||
textBubbleSent = listOf(Color.Black, Color.Black, Color.Black, oceanLightColors[1])[index],
|
||||
|
@ -62,7 +62,7 @@ val smallButton = Modifier.wrapContentHeight()
|
||||
fun SessionButtonText(
|
||||
text: String,
|
||||
modifier: Modifier = Modifier,
|
||||
color: Color = LocalColors.current.text,
|
||||
color: Color = LocalColors.current.button,
|
||||
enabled: Boolean = true
|
||||
) {
|
||||
Text(
|
||||
@ -113,7 +113,7 @@ fun OutlineButton(
|
||||
onClick = onClick,
|
||||
border = BorderStroke(1.dp, if (enabled) color else LocalColors.current.disabled),
|
||||
colors = ButtonDefaults.outlinedButtonColors(
|
||||
contentColor = if (enabled) color else Color.Unspecified,
|
||||
contentColor = if (enabled) color else LocalColors.current.disabled,
|
||||
backgroundColor = Color.Unspecified
|
||||
)
|
||||
) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user