Change losange ASCII character.

This commit is contained in:
Thomas Andres Gomez 2023-08-02 11:54:31 +02:00
parent a74b32d6e3
commit b865547717
8 changed files with 29 additions and 33 deletions

View file

@ -26,6 +26,7 @@ import androidx.compose.ui.tooling.preview.PreviewParameterProvider
import androidx.compose.ui.unit.dp
import com.pixelized.rplexicon.R
import com.pixelized.rplexicon.ui.theme.LexiconTheme
import com.pixelized.rplexicon.utilitary.LOS_HOLLOW
import com.pixelized.rplexicon.utilitary.extentions.cell
import com.pixelized.rplexicon.utilitary.extentions.lexicon
import com.pixelized.rplexicon.utilitary.extentions.placeholder
@ -75,8 +76,10 @@ fun LexiconItem(
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
Text(
modifier = Modifier.alignByBaseline(),
text = "",
modifier = Modifier
.alignByBaseline()
.placeholder { item.placeholder },
text = LOS_HOLLOW,
)
FlowRow(

View file

@ -50,6 +50,8 @@ import com.pixelized.rplexicon.ui.composable.BackgroundImage
import com.pixelized.rplexicon.ui.navigation.LocalScreenNavHost
import com.pixelized.rplexicon.ui.navigation.screens.navigateToLexiconDetail
import com.pixelized.rplexicon.ui.theme.LexiconTheme
import com.pixelized.rplexicon.utilitary.LOS_FULL
import com.pixelized.rplexicon.utilitary.LOS_HOLLOW
import com.pixelized.rplexicon.utilitary.extentions.lexicon
import com.pixelized.rplexicon.utilitary.extentions.scrollOffset
import java.lang.Integer.min
@ -267,15 +269,15 @@ private fun QuestDetailContent(
)
) {
Text(
style = MaterialTheme.typography.bodyMedium,
style = MaterialTheme.typography.titleMedium,
fontWeight = FontWeight.Bold,
text = stringResource(id = R.string.quest_detail_giver),
)
Text(
style = MaterialTheme.typography.bodyMedium,
text = when (quest.giverId) {
null -> " $it"
else -> " $it"
null -> "$LOS_HOLLOW $it"
else -> "$LOS_FULL $it"
},
)
}
@ -283,7 +285,7 @@ private fun QuestDetailContent(
quest.place?.let {
Column {
Text(
style = MaterialTheme.typography.bodyMedium,
style = MaterialTheme.typography.titleMedium,
fontWeight = FontWeight.Bold,
text = stringResource(id = R.string.quest_detail_area),
)
@ -296,7 +298,7 @@ private fun QuestDetailContent(
quest.globalReward?.let {
Column {
Text(
style = MaterialTheme.typography.bodyMedium,
style = MaterialTheme.typography.titleMedium,
fontWeight = FontWeight.Bold,
text = stringResource(id = R.string.quest_detail_individual_reward),
)
@ -309,7 +311,7 @@ private fun QuestDetailContent(
quest.individualReward?.let {
Column {
Text(
style = MaterialTheme.typography.bodyMedium,
style = MaterialTheme.typography.titleMedium,
fontWeight = FontWeight.Bold,
text = stringResource(id = R.string.quest_detail_group_rewars),
)

View file

@ -18,6 +18,8 @@ import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.ui.tooling.preview.PreviewParameterProvider
import androidx.compose.ui.unit.dp
import com.pixelized.rplexicon.ui.theme.LexiconTheme
import com.pixelized.rplexicon.utilitary.LOS_FULL
import com.pixelized.rplexicon.utilitary.LOS_HOLLOW
import com.pixelized.rplexicon.utilitary.extentions.cell
import com.pixelized.rplexicon.utilitary.extentions.lexicon
import com.pixelized.rplexicon.utilitary.extentions.placeholder
@ -65,7 +67,7 @@ fun QuestItem(
true -> Modifier.placeholder { true }
else -> Modifier.alignByBaseline()
},
text = if (item.complete) "" else "",
text = if (item.complete) LOS_FULL else LOS_HOLLOW,
)
Text(
modifier = when (item.placeholder) {

View file

@ -10,7 +10,6 @@ import androidx.compose.runtime.Stable
import androidx.compose.runtime.compositionLocalOf
import androidx.compose.runtime.remember
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalDensity
import androidx.compose.ui.platform.LocalView
import androidx.core.view.WindowCompat
import com.pixelized.rplexicon.ui.theme.animation.LexiconAnimation
@ -43,11 +42,9 @@ fun LexiconTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
content: @Composable () -> Unit
) {
val density = LocalDensity.current
val lexiconTheme = remember {
LexiconTheme(
animation = lexiconAnimation(density = density),
animation = lexiconAnimation(),
colorScheme = when (darkTheme) {
true -> darkColorScheme()
else -> lightColorScheme()

View file

@ -5,12 +5,8 @@ import androidx.compose.animation.ContentTransform
import androidx.compose.animation.ExperimentalAnimationApi
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
import androidx.compose.animation.slideInHorizontally
import androidx.compose.animation.slideOutHorizontally
import androidx.compose.animation.with
import androidx.compose.runtime.Stable
import androidx.compose.ui.unit.Density
import androidx.compose.ui.unit.dp
@Stable
@OptIn(ExperimentalAnimationApi::class)
@ -19,14 +15,6 @@ data class LexiconAnimation constructor(
)
@OptIn(ExperimentalAnimationApi::class)
fun lexiconAnimation(
density: Density,
): LexiconAnimation = LexiconAnimation(
itemList = with(density) {
{
val enter = fadeIn() + slideInHorizontally { 8.dp.roundToPx() }
val exit = fadeOut() + slideOutHorizontally { 8.dp.roundToPx() }
enter with exit
}
},
fun lexiconAnimation(): LexiconAnimation = LexiconAnimation(
itemList = { fadeIn() with fadeOut() },
)

View file

@ -0,0 +1,4 @@
package com.pixelized.rplexicon.utilitary
const val LOS_FULL = ""
const val LOS_HOLLOW = ""

View file

@ -34,9 +34,9 @@
<string name="lexicon_search">Rechercher</string>
<string name="detail_title">Détails du personnage</string>
<string name="detail_description">Description</string>
<string name="detail_history">Histoire</string>
<string name="detail_portrait">Portrait</string>
<string name="detail_description">Description :</string>
<string name="detail_history">Histoire :</string>
<string name="detail_portrait">Portrait :</string>
<string name="search_field_title">Rechercher</string>
<string name="search_field_search">Rechercher</string>

View file

@ -34,9 +34,9 @@
<string name="lexicon_search">Search</string>
<string name="detail_title">Character\'s details</string>
<string name="detail_description">Description</string>
<string name="detail_history">History</string>
<string name="detail_portrait">Portrait</string>
<string name="detail_description">Description:</string>
<string name="detail_history">History:</string>
<string name="detail_portrait">Portrait:</string>
<string name="search_field_title">Search</string>
<string name="search_field_search">Search</string>