mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Improve theming
This commit is contained in:
parent
0c2682fe47
commit
d5b3d9bcf9
@ -14,10 +14,13 @@ import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.rememberScrollState
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material.Divider
|
||||
import androidx.compose.material.LocalTextStyle
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.ComposeView
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
@ -109,7 +112,7 @@ class MessageDetailActivity: PassphraseRequiredActionBarActivity() {
|
||||
.width(60.dp)
|
||||
.height(60.dp))
|
||||
Column {
|
||||
titledText(user)
|
||||
titledText(user, valueStyle = LocalTextStyle.current.copy(fontFamily = FontFamily.Monospace))
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -134,10 +137,10 @@ class MessageDetailActivity: PassphraseRequiredActionBarActivity() {
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun titledText(titledText: TitledText, modifier: Modifier = Modifier) {
|
||||
fun titledText(titledText: TitledText, modifier: Modifier = Modifier, valueStyle: TextStyle = LocalTextStyle.current) {
|
||||
Column(modifier = modifier, verticalArrangement = Arrangement.spacedBy(4.dp)) {
|
||||
Title(titledText.title)
|
||||
Text(titledText.value)
|
||||
Text(titledText.value, style = valueStyle)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,9 @@ import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.layout.wrapContentHeight
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.ButtonColors
|
||||
import androidx.compose.material.Card
|
||||
import androidx.compose.material.Icon
|
||||
import androidx.compose.material.MaterialTheme
|
||||
import androidx.compose.material.Text
|
||||
import androidx.compose.material.TextButton
|
||||
import androidx.compose.runtime.Composable
|
||||
@ -55,13 +57,15 @@ fun Cell(content: @Composable () -> Unit) {
|
||||
|
||||
@Composable
|
||||
fun CellWithPadding(padding: Dp = 24.dp, content: @Composable () -> Unit) {
|
||||
androidx.compose.material.Card(
|
||||
Card(
|
||||
shape = RoundedCornerShape(16.dp),
|
||||
elevation = 0.dp,
|
||||
modifier = Modifier
|
||||
.wrapContentHeight()
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 32.dp),
|
||||
backgroundColor = LocalExtraColors.current.settingsBackground
|
||||
backgroundColor = LocalExtraColors.current.settingsBackground,
|
||||
// probably wrong
|
||||
contentColor = MaterialTheme.colors.onSurface
|
||||
) { Box(Modifier.padding(padding)) { content() } }
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user