tint the library background and fab from the current artwork

This commit is contained in:
austinried
2026-10-04 00:29:56 +00:00
parent a633a6c290
commit 8ab4cbb0d0
3 changed files with 59 additions and 4 deletions
@@ -117,6 +117,44 @@ class AppScreenshotTest {
composeRule.onRoot().captureRoboImage("src/test/screenshots/library_playlists.png")
}
@Test
fun libraryWithMiniPlayer() {
composeRule.setContent {
SubtracksTheme {
val artwork = artworkColorsFromSeed(Color.rgb(120, 80, 200))
Column(Modifier.fillMaxSize()) {
LibraryScreen(
selectedTab = LibraryTab.Albums,
onTabSelected = {},
albums = remember { flowOf(PagingData.from(Fixtures.albums)) }.collectAsLazyPagingItems(),
artists = remember { flowOf(PagingData.from(Fixtures.artists)) }.collectAsLazyPagingItems(),
songs = remember { flowOf(PagingData.from(Fixtures.songItems)) }.collectAsLazyPagingItems(),
playlists = remember { flowOf(PagingData.from(Fixtures.playlists)) }.collectAsLazyPagingItems(),
coverArt = { id, _ -> id?.let { CoverArtRef(it, "test:$it") } },
onAlbumClick = {},
onArtistClick = {},
onPlaylistClick = {},
onSongClick = {},
onSync = {},
onOpenSettings = {},
artwork = artwork,
modifier = Modifier.weight(1f),
)
MiniPlayer(
state = Fixtures.playbackState(),
coverArt = CoverArtRef("art-al-kid-a", "test:art-al-kid-a"),
artwork = artwork,
onExpand = {},
onPlayPause = {},
onNext = {},
)
}
}
}
awaitTag(ALBUM_COVER_TAG)
composeRule.onRoot().captureRoboImage("src/test/screenshots/library_with_mini_player.png")
}
@Test
fun albumDetail() {
composeRule.setContent {
@@ -396,6 +434,7 @@ class AppScreenshotTest {
onSongClick = {},
onSync = {},
onOpenSettings = {},
artwork = artworkColorsFromSeed(Color.rgb(120, 80, 200)),
)
}
}