fix colors

This commit is contained in:
geeksville 2020-02-17 10:05:29 -08:00
parent ea60f350b0
commit 1139883527
5 changed files with 11 additions and 9 deletions

View file

@ -104,12 +104,14 @@ fun HomeContent() {
}
}
val palette = lightColorPalette() // darkColorPalette()
@Composable
fun MeshApp() {
val (drawerState, onDrawerStateChange) = state { DrawerState.Closed }
MaterialTheme(colors = darkColorPalette()) {
MaterialTheme(colors = palette) {
ModalDrawerLayout(
drawerState = drawerState,
onStateChange = onDrawerStateChange,
@ -129,7 +131,7 @@ fun MeshApp() {
@Composable
fun previewView() {
// It seems modaldrawerlayout not yet supported in preview
MaterialTheme(colors = darkColorPalette()) {
MaterialTheme(colors = palette) {
HomeContent()
}
}

View file

@ -11,7 +11,6 @@ import androidx.ui.layout.Column
import androidx.ui.layout.LayoutPadding
import androidx.ui.layout.LayoutSize
import androidx.ui.material.MaterialTheme
import androidx.ui.material.darkColorPalette
import androidx.ui.material.surface.Surface
import androidx.ui.text.TextStyle
import androidx.ui.tooling.preview.Preview
@ -57,7 +56,7 @@ fun MessagesContent() {
val message = state { "text message" }
val colors = MaterialTheme.colors()
val backgroundColor = colors.surface.copy(alpha = 0.12f)
val backgroundColor = colors.secondary.copy(alpha = 0.12f)
Surface(
modifier = LayoutPadding(8.dp),
@ -68,7 +67,7 @@ fun MessagesContent() {
value = message.value,
onValueChange = { message.value = it },
textStyle = TextStyle(
color = colors.onSurface.copy(alpha = 0.8f)
color = colors.onSecondary.copy(alpha = 0.8f)
),
imeAction = ImeAction.Send,
onImeActionPerformed = {
@ -85,7 +84,7 @@ fun MessagesContent() {
@Composable
fun previewMessagesView() {
// another bug? It seems modaldrawerlayout not yet supported in preview
MaterialTheme(colors = darkColorPalette()) {
MaterialTheme(colors = palette) {
MessagesContent()
}
}