mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-10-31 14:27:57 +01:00 
			
		
		
		
	Minor UI fixes
- Remove M3 styling from search toolbar - Use secondary alpha for subtitles for Sources and Migrate items - Update some content descriptions
This commit is contained in:
		| @@ -37,6 +37,7 @@ import eu.kanade.presentation.components.ScrollbarLazyColumn | ||||
| import eu.kanade.presentation.theme.header | ||||
| import eu.kanade.presentation.util.horizontalPadding | ||||
| import eu.kanade.presentation.util.plus | ||||
| import eu.kanade.presentation.util.secondaryItemAlpha | ||||
| import eu.kanade.presentation.util.topPaddingValues | ||||
| import eu.kanade.tachiyomi.R | ||||
| import eu.kanade.tachiyomi.ui.browse.migration.sources.MigrationSourcesPresenter | ||||
| @@ -162,6 +163,7 @@ private fun MigrateSourceItem( | ||||
|                 ) { | ||||
|                     if (sourceLangString != null) { | ||||
|                         Text( | ||||
|                             modifier = Modifier.secondaryItemAlpha(), | ||||
|                             text = sourceLangString, | ||||
|                             maxLines = 1, | ||||
|                             overflow = TextOverflow.Ellipsis, | ||||
| @@ -170,6 +172,7 @@ private fun MigrateSourceItem( | ||||
|                     } | ||||
|                     if (source.isStub) { | ||||
|                         Text( | ||||
|                             modifier = Modifier.secondaryItemAlpha(), | ||||
|                             text = stringResource(R.string.not_installed), | ||||
|                             maxLines = 1, | ||||
|                             overflow = TextOverflow.Ellipsis, | ||||
|   | ||||
| @@ -187,11 +187,12 @@ private fun SourcePinButton( | ||||
| ) { | ||||
|     val icon = if (isPinned) Icons.Filled.PushPin else Icons.Outlined.PushPin | ||||
|     val tint = if (isPinned) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.onBackground | ||||
|     val description = if (isPinned) R.string.action_unpin else R.string.action_pin | ||||
|     IconButton(onClick = onClick) { | ||||
|         Icon( | ||||
|             imageVector = icon, | ||||
|             contentDescription = "", | ||||
|             tint = tint, | ||||
|             contentDescription = stringResource(description), | ||||
|         ) | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -11,6 +11,7 @@ import androidx.compose.ui.platform.LocalContext | ||||
| import androidx.compose.ui.text.style.TextOverflow | ||||
| import eu.kanade.domain.source.model.Source | ||||
| import eu.kanade.presentation.util.horizontalPadding | ||||
| import eu.kanade.presentation.util.secondaryItemAlpha | ||||
| import eu.kanade.tachiyomi.util.system.LocaleHelper | ||||
|  | ||||
| @Composable | ||||
| @@ -53,6 +54,7 @@ private val defaultContent: @Composable RowScope.(Source, String?) -> Unit = { s | ||||
|         ) | ||||
|         if (sourceLangString != null) { | ||||
|             Text( | ||||
|                 modifier = Modifier.secondaryItemAlpha(), | ||||
|                 text = sourceLangString, | ||||
|                 maxLines = 1, | ||||
|                 overflow = TextOverflow.Ellipsis, | ||||
|   | ||||
| @@ -49,7 +49,7 @@ fun SourceIcon( | ||||
|         source.isStub && icon == null -> { | ||||
|             Image( | ||||
|                 imageVector = Icons.Default.Warning, | ||||
|                 contentDescription = "", | ||||
|                 contentDescription = null, | ||||
|                 colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.error), | ||||
|                 modifier = modifier.then(defaultModifier), | ||||
|             ) | ||||
| @@ -57,14 +57,14 @@ fun SourceIcon( | ||||
|         icon != null -> { | ||||
|             Image( | ||||
|                 bitmap = icon, | ||||
|                 contentDescription = "", | ||||
|                 contentDescription = null, | ||||
|                 modifier = modifier.then(defaultModifier), | ||||
|             ) | ||||
|         } | ||||
|         else -> { | ||||
|             Image( | ||||
|                 painter = painterResource(id = R.mipmap.ic_local_source), | ||||
|                 contentDescription = "", | ||||
|                 contentDescription = null, | ||||
|                 modifier = modifier.then(defaultModifier), | ||||
|             ) | ||||
|         } | ||||
|   | ||||
| @@ -10,6 +10,7 @@ import androidx.compose.foundation.layout.statusBars | ||||
| import androidx.compose.foundation.text.BasicTextField | ||||
| import androidx.compose.foundation.text.KeyboardActions | ||||
| import androidx.compose.foundation.text.KeyboardOptions | ||||
| import androidx.compose.material.TextFieldDefaults | ||||
| import androidx.compose.material.icons.Icons | ||||
| import androidx.compose.material.icons.filled.ArrowBack | ||||
| import androidx.compose.material.icons.filled.Close | ||||
| @@ -21,7 +22,6 @@ import androidx.compose.material3.Icon | ||||
| import androidx.compose.material3.IconButton | ||||
| import androidx.compose.material3.MaterialTheme | ||||
| import androidx.compose.material3.Text | ||||
| import androidx.compose.material3.TextFieldDefaults | ||||
| import androidx.compose.material3.TopAppBar | ||||
| import androidx.compose.material3.TopAppBarDefaults | ||||
| import androidx.compose.material3.TopAppBarScrollBehavior | ||||
| @@ -44,6 +44,7 @@ import androidx.compose.ui.text.input.VisualTransformation | ||||
| import androidx.compose.ui.text.style.TextOverflow | ||||
| import androidx.compose.ui.unit.dp | ||||
| import androidx.compose.ui.unit.sp | ||||
| import eu.kanade.presentation.util.secondaryItemAlpha | ||||
| import eu.kanade.tachiyomi.R | ||||
|  | ||||
| @Composable | ||||
| @@ -266,6 +267,7 @@ fun SearchToolbar( | ||||
|                         placeholder = { | ||||
|                             if (!placeholderText.isNullOrEmpty()) { | ||||
|                                 Text( | ||||
|                                     modifier = Modifier.secondaryItemAlpha(), | ||||
|                                     text = placeholderText, | ||||
|                                     maxLines = 1, | ||||
|                                     overflow = TextOverflow.Ellipsis, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user