Fix questItem spacing.
This commit is contained in:
		
							parent
							
								
									0fe6fe6a33
								
							
						
					
					
						commit
						b17eefac39
					
				
					 1 changed files with 34 additions and 30 deletions
				
			
		| 
						 | 
					@ -2,6 +2,7 @@ package com.pixelized.rplexicon.ui.screens.quest.list
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import android.content.res.Configuration
 | 
					import android.content.res.Configuration
 | 
				
			||||||
import androidx.compose.foundation.layout.Arrangement
 | 
					import androidx.compose.foundation.layout.Arrangement
 | 
				
			||||||
 | 
					import androidx.compose.foundation.layout.Box
 | 
				
			||||||
import androidx.compose.foundation.layout.Row
 | 
					import androidx.compose.foundation.layout.Row
 | 
				
			||||||
import androidx.compose.material3.MaterialTheme
 | 
					import androidx.compose.material3.MaterialTheme
 | 
				
			||||||
import androidx.compose.material3.Surface
 | 
					import androidx.compose.material3.Surface
 | 
				
			||||||
| 
						 | 
					@ -52,39 +53,42 @@ fun QuestItem(
 | 
				
			||||||
) {
 | 
					) {
 | 
				
			||||||
    val typography = MaterialTheme.lexicon.typography
 | 
					    val typography = MaterialTheme.lexicon.typography
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Row(
 | 
					    Box(
 | 
				
			||||||
        modifier = modifier,
 | 
					        modifier = modifier,
 | 
				
			||||||
        verticalAlignment = Alignment.CenterVertically,
 | 
					        contentAlignment = Alignment.CenterStart,
 | 
				
			||||||
        horizontalArrangement = Arrangement.spacedBy(8.dp),
 | 
					 | 
				
			||||||
    ) {
 | 
					    ) {
 | 
				
			||||||
        Text(
 | 
					        Row(
 | 
				
			||||||
            modifier = when (item.placeholder) {
 | 
					            horizontalArrangement = Arrangement.spacedBy(8.dp),
 | 
				
			||||||
                true -> Modifier.placeholder { true }
 | 
					        ) {
 | 
				
			||||||
                else -> Modifier.alignByBaseline()
 | 
					            Text(
 | 
				
			||||||
            },
 | 
					                modifier = when (item.placeholder) {
 | 
				
			||||||
            text = if (item.complete) "⧫" else "◊",
 | 
					                    true -> Modifier.placeholder { true }
 | 
				
			||||||
        )
 | 
					                    else -> Modifier.alignByBaseline()
 | 
				
			||||||
        Text(
 | 
					                },
 | 
				
			||||||
            modifier = when (item.placeholder) {
 | 
					                text = if (item.complete) "⧫" else "◊",
 | 
				
			||||||
                true -> Modifier.placeholder { true }
 | 
					            )
 | 
				
			||||||
                else -> Modifier.alignByBaseline()
 | 
					            Text(
 | 
				
			||||||
            },
 | 
					                modifier = when (item.placeholder) {
 | 
				
			||||||
            text = remember(item.placeholder) {
 | 
					                    true -> Modifier.placeholder { true }
 | 
				
			||||||
                AnnotatedString(
 | 
					                    else -> Modifier.alignByBaseline()
 | 
				
			||||||
                    text = item.title,
 | 
					                },
 | 
				
			||||||
                    spanStyles = when (item.placeholder) {
 | 
					                text = remember(item.placeholder) {
 | 
				
			||||||
                        true -> emptyList()
 | 
					                    AnnotatedString(
 | 
				
			||||||
                        else -> listOf(
 | 
					                        text = item.title,
 | 
				
			||||||
                            AnnotatedString.Range(
 | 
					                        spanStyles = when (item.placeholder) {
 | 
				
			||||||
                                item = typography.dropCapMediumSpan,
 | 
					                            true -> emptyList()
 | 
				
			||||||
                                start = 0,
 | 
					                            else -> listOf(
 | 
				
			||||||
                                end = 1,
 | 
					                                AnnotatedString.Range(
 | 
				
			||||||
 | 
					                                    item = typography.dropCapMediumSpan,
 | 
				
			||||||
 | 
					                                    start = 0,
 | 
				
			||||||
 | 
					                                    end = 1,
 | 
				
			||||||
 | 
					                                )
 | 
				
			||||||
                            )
 | 
					                            )
 | 
				
			||||||
                        )
 | 
					                        },
 | 
				
			||||||
                    },
 | 
					                    )
 | 
				
			||||||
                )
 | 
					                },
 | 
				
			||||||
            },
 | 
					            )
 | 
				
			||||||
        )
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue