mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-05 12:54:35 +00:00
Better rendering on screenshot test
This commit is contained in:
committed by
Benoit Marty
parent
89b66b5a36
commit
32f95e70cb
+16
-4
@@ -38,10 +38,22 @@ import kotlinx.collections.immutable.toPersistentList
|
|||||||
|
|
||||||
@DayNightPreviews
|
@DayNightPreviews
|
||||||
@Composable
|
@Composable
|
||||||
internal fun IconsCompoundPreview() = ElementPreview {
|
internal fun IconsCompoundPart1Preview() = ElementPreview {
|
||||||
IconsPreview(
|
IconsPreview(
|
||||||
title = "R.drawable.ic_compound_*",
|
title = "R.drawable.ic_compound_* 1 / 2",
|
||||||
iconsList = iconsCompound.toPersistentList(),
|
iconsList = iconsCompound.take(36).toPersistentList(),
|
||||||
|
iconNameTransform = { name ->
|
||||||
|
name.removePrefix("ic_compound_")
|
||||||
|
.replace("_", " ")
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
@DayNightPreviews
|
||||||
|
@Composable
|
||||||
|
internal fun IconsCompoundPart2Preview() = ElementPreview {
|
||||||
|
IconsPreview(
|
||||||
|
title = "R.drawable.ic_compound_* 2 / 2",
|
||||||
|
iconsList = iconsCompound.drop(36).toPersistentList(),
|
||||||
iconNameTransform = { name ->
|
iconNameTransform = { name ->
|
||||||
name.removePrefix("ic_compound_")
|
name.removePrefix("ic_compound_")
|
||||||
.replace("_", " ")
|
.replace("_", " ")
|
||||||
@@ -90,7 +102,7 @@ private fun IconsPreview(
|
|||||||
text = title,
|
text = title,
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
)
|
)
|
||||||
iconsList.chunked(8).forEach { iconsRow ->
|
iconsList.chunked(6).forEach { iconsRow ->
|
||||||
Row(horizontalArrangement = Arrangement.spacedBy(1.dp)) {
|
Row(horizontalArrangement = Arrangement.spacedBy(1.dp)) {
|
||||||
iconsRow.forEach { icon ->
|
iconsRow.forEach { icon ->
|
||||||
Column(
|
Column(
|
||||||
|
|||||||
Reference in New Issue
Block a user