Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

Commit

Permalink
Closes #26870: remove layer behind wallpaper thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewTighe authored and mergify[bot] committed Sep 7, 2022
1 parent adb7f7d commit 1eba805
Showing 1 changed file with 19 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,28 +159,26 @@ private fun WallpaperThumbnails(
numColumns: Int = 3,
onSelectWallpaper: (Wallpaper) -> Unit,
) {
Surface(color = FirefoxTheme.colors.layer2) {
Column(modifier = Modifier.padding(vertical = 30.dp, horizontal = 20.dp)) {
val numRows = (wallpapers.size + numColumns - 1) / numColumns
for (rowIndex in 0 until numRows) {
Row {
for (columnIndex in 0 until numColumns) {
val itemIndex = rowIndex * numColumns + columnIndex
if (itemIndex < wallpapers.size) {
Box(
modifier = Modifier.weight(1f, fill = true).padding(4.dp),
) {
WallpaperThumbnailItem(
wallpaper = wallpapers[itemIndex],
defaultWallpaper = defaultWallpaper,
loadWallpaperResource = loadWallpaperResource,
isSelected = selectedWallpaper == wallpapers[itemIndex],
onSelect = onSelectWallpaper
)
}
} else {
Spacer(Modifier.weight(1f))
Column(modifier = Modifier.padding(vertical = 30.dp, horizontal = 20.dp)) {
val numRows = (wallpapers.size + numColumns - 1) / numColumns
for (rowIndex in 0 until numRows) {
Row {
for (columnIndex in 0 until numColumns) {
val itemIndex = rowIndex * numColumns + columnIndex
if (itemIndex < wallpapers.size) {
Box(
modifier = Modifier.weight(1f, fill = true).padding(4.dp),
) {
WallpaperThumbnailItem(
wallpaper = wallpapers[itemIndex],
defaultWallpaper = defaultWallpaper,
loadWallpaperResource = loadWallpaperResource,
isSelected = selectedWallpaper == wallpapers[itemIndex],
onSelect = onSelectWallpaper
)
}
} else {
Spacer(Modifier.weight(1f))
}
}
}
Expand Down

0 comments on commit 1eba805

Please sign in to comment.