Skip to content

Commit

Permalink
Change Recommendation button style & enable default showing it
Browse files Browse the repository at this point in the history
  • Loading branch information
cuong-tran committed Jun 18, 2024
1 parent edf222e commit a539028
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/eu/kanade/domain/ui/UiPreferences.kt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class UiPreferences(
fun expandRelatedTitles() = preferenceStore.getBoolean("expand_related_titles", true)
// 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)

Expand Down
6 changes: 4 additions & 2 deletions app/src/main/java/eu/kanade/presentation/manga/MangaScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,8 @@ private fun MangaScreenSmallImpl(
contentType = MangaScreenItem.RELATED_TITLES,
) {
OutlinedButtonWithArrow(
text = stringResource(KMR.strings.pref_source_related_mangas),
text = stringResource(KMR.strings.pref_source_related_mangas)
.uppercase(),
onClick = onRelatedMangasScreenClick,
)
}
Expand Down Expand Up @@ -994,7 +995,8 @@ private fun MangaScreenLargeImpl(
) {
Column {
RelatedMangaTitle(
title = stringResource(KMR.strings.pref_source_related_mangas),
title = stringResource(KMR.strings.pref_source_related_mangas)
.uppercase(),
subtitle = null,
onClick = onRelatedMangasScreenClick,
onLongClick = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,10 @@ fun MangaInfoButtons(
}
}
if (showRecommendsButton) {
Button(
OutlinedButtonWithArrow(
text = stringResource(SYMR.strings.az_recommends),
onClick = onRecommendClicked,
Modifier
.fillMaxWidth()
.padding(horizontal = 16.dp, vertical = 4.dp),
) {
Text(stringResource(SYMR.strings.az_recommends))
}
)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ fun OutlinedButtonWithArrow(
onClick = onClick,
modifier = modifier
.fillMaxWidth()
.padding(MaterialTheme.padding.small),
.padding(
horizontal = MaterialTheme.padding.medium,
vertical = MaterialTheme.padding.small,
),
colors = ButtonDefaults.outlinedButtonColors(),
shape = RoundedCornerShape(8.dp)
) {
Expand All @@ -43,7 +46,7 @@ fun OutlinedButtonWithArrow(
verticalAlignment = Alignment.CenterVertically
) {
Text(
text = text.uppercase(),
text = text,
)
Spacer(modifier = Modifier.width(4.dp))
Icon(
Expand Down

0 comments on commit a539028

Please sign in to comment.