Theme modification.
This commit is contained in:
parent
080d2e2b49
commit
586da03460
6 changed files with 25 additions and 26 deletions
3
.idea/misc.xml
generated
3
.idea/misc.xml
generated
|
|
@ -76,6 +76,9 @@
|
||||||
<entry key="../../../../../layout/compose-model-1620391384718.xml" value="0.26296296296296295" />
|
<entry key="../../../../../layout/compose-model-1620391384718.xml" value="0.26296296296296295" />
|
||||||
<entry key="../../../../../layout/compose-model-1620397702847.xml" value="0.28125" />
|
<entry key="../../../../../layout/compose-model-1620397702847.xml" value="0.28125" />
|
||||||
<entry key="../../../../../layout/compose-model-1620399131186.xml" value="0.1" />
|
<entry key="../../../../../layout/compose-model-1620399131186.xml" value="0.1" />
|
||||||
|
<entry key="../../../../../layout/compose-model-1620400432847.xml" value="0.28125" />
|
||||||
|
<entry key="../../../../../layout/compose-model-1620400507721.xml" value="0.2962962962962963" />
|
||||||
|
<entry key="../../../../../layout/compose-model-1620400535629.xml" value="0.16300675675675674" />
|
||||||
<entry key="app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.2898148148148148" />
|
<entry key="app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.2898148148148148" />
|
||||||
<entry key="app/src/main/res/drawable/ic_baseline_local_library_24.xml" value="0.25462962962962965" />
|
<entry key="app/src/main/res/drawable/ic_baseline_local_library_24.xml" value="0.25462962962962965" />
|
||||||
<entry key="app/src/main/res/drawable/ic_google.xml" value="0.2962962962962963" />
|
<entry key="app/src/main/res/drawable/ic_google.xml" value="0.2962962962962963" />
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,6 @@ fun Image(
|
||||||
alignment = alignment,
|
alignment = alignment,
|
||||||
contentScale = contentScale,
|
contentScale = contentScale,
|
||||||
alpha = alpha,
|
alpha = alpha,
|
||||||
colorFilter = colorFilter,
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,10 +57,6 @@ fun DetailPageComposable(book: BookUio) {
|
||||||
Row(modifier = Modifier.padding(bottom = 16.dp)) {
|
Row(modifier = Modifier.padding(bottom = 16.dp)) {
|
||||||
Button(
|
Button(
|
||||||
modifier = Modifier.weight(1f),
|
modifier = Modifier.weight(1f),
|
||||||
colors = ButtonDefaults.textButtonColors(
|
|
||||||
backgroundColor = Teal200,
|
|
||||||
contentColor = Color.Black,
|
|
||||||
),
|
|
||||||
onClick = { }) {
|
onClick = { }) {
|
||||||
Text(text = "EPUB")
|
Text(text = "EPUB")
|
||||||
}
|
}
|
||||||
|
|
@ -68,19 +64,11 @@ fun DetailPageComposable(book: BookUio) {
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.weight(1f)
|
.weight(1f)
|
||||||
.padding(horizontal = 8.dp),
|
.padding(horizontal = 8.dp),
|
||||||
colors = ButtonDefaults.textButtonColors(
|
|
||||||
backgroundColor = Teal200,
|
|
||||||
contentColor = Color.Black,
|
|
||||||
),
|
|
||||||
onClick = { }) {
|
onClick = { }) {
|
||||||
Text(text = "MOBI")
|
Text(text = "MOBI")
|
||||||
}
|
}
|
||||||
Button(
|
Button(
|
||||||
modifier = Modifier.weight(1f),
|
modifier = Modifier.weight(1f),
|
||||||
colors = ButtonDefaults.textButtonColors(
|
|
||||||
backgroundColor = Teal200,
|
|
||||||
contentColor = Color.Black,
|
|
||||||
),
|
|
||||||
onClick = { }) {
|
onClick = { }) {
|
||||||
Text(text = "SEND")
|
Text(text = "SEND")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,9 @@ import androidx.compose.foundation.layout.*
|
||||||
import androidx.compose.foundation.rememberScrollState
|
import androidx.compose.foundation.rememberScrollState
|
||||||
import androidx.compose.foundation.verticalScroll
|
import androidx.compose.foundation.verticalScroll
|
||||||
import androidx.compose.material.*
|
import androidx.compose.material.*
|
||||||
import androidx.compose.material.ButtonDefaults.textButtonColors
|
import androidx.compose.material.ButtonDefaults.outlinedButtonColors
|
||||||
|
import androidx.compose.material.TextFieldDefaults.outlinedTextFieldColors
|
||||||
|
import androidx.compose.material.TextFieldDefaults.textFieldColors
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.sharp.Visibility
|
import androidx.compose.material.icons.sharp.Visibility
|
||||||
import androidx.compose.material.icons.sharp.VisibilityOff
|
import androidx.compose.material.icons.sharp.VisibilityOff
|
||||||
|
|
@ -86,7 +88,7 @@ fun LoginScreenComposable(
|
||||||
) {
|
) {
|
||||||
Button(
|
Button(
|
||||||
modifier = Modifier.padding(end = 8.dp),
|
modifier = Modifier.padding(end = 8.dp),
|
||||||
colors = textButtonColors(),
|
colors = outlinedButtonColors(),
|
||||||
onClick = {
|
onClick = {
|
||||||
// TODO:
|
// TODO:
|
||||||
navigationViewModel.navigateTo(NavigationViewModel.Screen.MainScreen)
|
navigationViewModel.navigateTo(NavigationViewModel.Screen.MainScreen)
|
||||||
|
|
@ -105,7 +107,7 @@ fun LoginScreenComposable(
|
||||||
|
|
||||||
Button(
|
Button(
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
colors = ButtonDefaults.outlinedButtonColors(),
|
colors = outlinedButtonColors(),
|
||||||
onClick = {
|
onClick = {
|
||||||
// TODO:
|
// TODO:
|
||||||
navigationViewModel.navigateTo(NavigationViewModel.Screen.MainScreen)
|
navigationViewModel.navigateTo(NavigationViewModel.Screen.MainScreen)
|
||||||
|
|
@ -125,10 +127,11 @@ private fun LoginField(viewModel: AuthenticationViewModel, modifier: Modifier =
|
||||||
TextField(
|
TextField(
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
value = login.value ?: "",
|
value = login.value ?: "",
|
||||||
|
onValueChange = { viewModel.updateLogin(it) },
|
||||||
label = { Text(text = stringResource(id = R.string.authentication_login)) },
|
label = { Text(text = stringResource(id = R.string.authentication_login)) },
|
||||||
|
colors = outlinedTextFieldColors(),
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
onValueChange = { viewModel.updateLogin(it) },
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -139,6 +142,9 @@ private fun PasswordField(viewModel: AuthenticationViewModel, modifier: Modifier
|
||||||
TextField(
|
TextField(
|
||||||
modifier = modifier,
|
modifier = modifier,
|
||||||
value = password.value ?: "",
|
value = password.value ?: "",
|
||||||
|
onValueChange = { viewModel.updatePassword(it) },
|
||||||
|
label = { Text(text = stringResource(id = R.string.authentication_password)) },
|
||||||
|
colors = outlinedTextFieldColors(),
|
||||||
maxLines = 1,
|
maxLines = 1,
|
||||||
singleLine = true,
|
singleLine = true,
|
||||||
visualTransformation = if (passwordVisibility) VisualTransformation.None else PasswordVisualTransformation(),
|
visualTransformation = if (passwordVisibility) VisualTransformation.None else PasswordVisualTransformation(),
|
||||||
|
|
@ -150,8 +156,6 @@ private fun PasswordField(viewModel: AuthenticationViewModel, modifier: Modifier
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
label = { Text(text = stringResource(id = R.string.authentication_password)) },
|
|
||||||
onValueChange = { viewModel.updatePassword(it) }
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,3 +6,7 @@ val Purple200 = Color(0xFFBB86FC)
|
||||||
val Purple500 = Color(0xFF6200EE)
|
val Purple500 = Color(0xFF6200EE)
|
||||||
val Purple700 = Color(0xFF3700B3)
|
val Purple700 = Color(0xFF3700B3)
|
||||||
val Teal200 = Color(0xFF03DAC5)
|
val Teal200 = Color(0xFF03DAC5)
|
||||||
|
|
||||||
|
val Green600 = Color(0xFF43a047)
|
||||||
|
val Green600L = Color(0XFF76d275)
|
||||||
|
val Green600D = Color(0XFF00701a)
|
||||||
|
|
@ -6,17 +6,18 @@ import androidx.compose.material.Surface
|
||||||
import androidx.compose.material.darkColors
|
import androidx.compose.material.darkColors
|
||||||
import androidx.compose.material.lightColors
|
import androidx.compose.material.lightColors
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
|
import androidx.compose.ui.graphics.Color
|
||||||
|
|
||||||
private val DarkColorPalette = darkColors(
|
private val DarkColorPalette = darkColors(
|
||||||
primary = Purple200,
|
primary = Green600,
|
||||||
primaryVariant = Purple700,
|
primaryVariant = Green600D,
|
||||||
secondary = Teal200
|
onPrimary = Color.White,
|
||||||
)
|
)
|
||||||
|
|
||||||
private val LightColorPalette = lightColors(
|
private val LightColorPalette = lightColors(
|
||||||
primary = Purple500,
|
primary = Green600,
|
||||||
primaryVariant = Purple700,
|
primaryVariant = Green600D,
|
||||||
secondary = Teal200
|
onPrimary = Color.White,
|
||||||
)
|
)
|
||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue