Change Recommendation button style & enable default showing it

This commit is contained in:
Tran M. Cuong 2024-06-18 18:54:48 +07:00
parent edf222e535
commit a539028ec0
No known key found for this signature in database
GPG key ID: 733AA7624B9315C2
4 changed files with 13 additions and 12 deletions

View file

@ -49,7 +49,7 @@ class UiPreferences(
fun expandRelatedTitles() = preferenceStore.getBoolean("expand_related_titles", true) fun expandRelatedTitles() = preferenceStore.getBoolean("expand_related_titles", true)
// KMK <-- // KMK <--
fun recommendsInOverflow() = preferenceStore.getBoolean("recommends_in_overflow", true) fun recommendsInOverflow() = preferenceStore.getBoolean("recommends_in_overflow", false)
fun mergeInOverflow() = preferenceStore.getBoolean("merge_in_overflow", true) fun mergeInOverflow() = preferenceStore.getBoolean("merge_in_overflow", true)

View file

@ -624,7 +624,8 @@ private fun MangaScreenSmallImpl(
contentType = MangaScreenItem.RELATED_TITLES, contentType = MangaScreenItem.RELATED_TITLES,
) { ) {
OutlinedButtonWithArrow( OutlinedButtonWithArrow(
text = stringResource(KMR.strings.pref_source_related_mangas), text = stringResource(KMR.strings.pref_source_related_mangas)
.uppercase(),
onClick = onRelatedMangasScreenClick, onClick = onRelatedMangasScreenClick,
) )
} }
@ -994,7 +995,8 @@ private fun MangaScreenLargeImpl(
) { ) {
Column { Column {
RelatedMangaTitle( RelatedMangaTitle(
title = stringResource(KMR.strings.pref_source_related_mangas), title = stringResource(KMR.strings.pref_source_related_mangas)
.uppercase(),
subtitle = null, subtitle = null,
onClick = onRelatedMangasScreenClick, onClick = onRelatedMangasScreenClick,
onLongClick = null, onLongClick = null,

View file

@ -31,14 +31,10 @@ fun MangaInfoButtons(
} }
} }
if (showRecommendsButton) { if (showRecommendsButton) {
Button( OutlinedButtonWithArrow(
text = stringResource(SYMR.strings.az_recommends),
onClick = onRecommendClicked, onClick = onRecommendClicked,
Modifier )
.fillMaxWidth()
.padding(horizontal = 16.dp, vertical = 4.dp),
) {
Text(stringResource(SYMR.strings.az_recommends))
}
} }
} }
} }

View file

@ -33,7 +33,10 @@ fun OutlinedButtonWithArrow(
onClick = onClick, onClick = onClick,
modifier = modifier modifier = modifier
.fillMaxWidth() .fillMaxWidth()
.padding(MaterialTheme.padding.small), .padding(
horizontal = MaterialTheme.padding.medium,
vertical = MaterialTheme.padding.small,
),
colors = ButtonDefaults.outlinedButtonColors(), colors = ButtonDefaults.outlinedButtonColors(),
shape = RoundedCornerShape(8.dp) shape = RoundedCornerShape(8.dp)
) { ) {
@ -43,7 +46,7 @@ fun OutlinedButtonWithArrow(
verticalAlignment = Alignment.CenterVertically verticalAlignment = Alignment.CenterVertically
) { ) {
Text( Text(
text = text.uppercase(), text = text,
) )
Spacer(modifier = Modifier.width(4.dp)) Spacer(modifier = Modifier.width(4.dp))
Icon( Icon(