[fenix] For https://github.com/mozilla-mobile/fenix/issues/23752: Address switch is off the screen in the Wallpaper settings.

pull/600/head
Arturo Mejia 3 years ago committed by mergify[bot]
parent 1971f8984c
commit 8ed591874a

@ -68,8 +68,7 @@ import java.util.Locale
* @param wallpapers Wallpapers to add to grid. * @param wallpapers Wallpapers to add to grid.
* @param selectedWallpaper The currently selected wallpaper. * @param selectedWallpaper The currently selected wallpaper.
* @param defaultWallpaper The default wallpaper * @param defaultWallpaper The default wallpaper
* @param loadWallpaperResource Callback to handle loading a wallpaper bitmap. Only optional in the * @param loadWallpaperResource Callback to handle loading a wallpaper bitmap. Only optional in the default case.
* default case.
* @param onSelectWallpaper Callback for when a new wallpaper is selected. * @param onSelectWallpaper Callback for when a new wallpaper is selected.
* @param onViewWallpaper Callback for when the view action is clicked from snackbar. * @param onViewWallpaper Callback for when the view action is clicked from snackbar.
* @param tapLogoSwitchChecked Enabled state for switch controlling taps to change wallpaper. * @param tapLogoSwitchChecked Enabled state for switch controlling taps to change wallpaper.
@ -164,8 +163,7 @@ private fun WallpaperSnackbar(
* *
* @param wallpapers Wallpapers to add to grid. * @param wallpapers Wallpapers to add to grid.
* @param defaultWallpaper The default wallpaper * @param defaultWallpaper The default wallpaper
* @param loadWallpaperResource Callback to handle loading a wallpaper bitmap. Only optional in the * @param loadWallpaperResource Callback to handle loading a wallpaper bitmap. Only optional in the default case.
* default case.
* @param selectedWallpaper The currently selected wallpaper. * @param selectedWallpaper The currently selected wallpaper.
* @param numColumns The number of columns that will occupy the grid. * @param numColumns The number of columns that will occupy the grid.
* @param onSelectWallpaper Action to take when a new wallpaper is selected. * @param onSelectWallpaper Action to take when a new wallpaper is selected.
@ -269,23 +267,25 @@ private fun WallpaperThumbnailItem(
} }
@Composable @Composable
@Suppress("MagicNumber")
private fun WallpaperLogoSwitch( private fun WallpaperLogoSwitch(
checked: Boolean, checked: Boolean,
onCheckedChange: (Boolean) -> Unit onCheckedChange: (Boolean) -> Unit
) { ) {
Column(
modifier = Modifier.padding(horizontal = 12.dp, vertical = 16.dp),
) {
Row( Row(
horizontalArrangement = Arrangement.SpaceBetween, modifier = Modifier
modifier = Modifier.fillMaxWidth() .padding(horizontal = 16.dp, vertical = 16.dp)
.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween
) { ) {
Text( Text(
text = stringResource(R.string.wallpaper_tap_to_change_switch_label_1), text = stringResource(R.string.wallpaper_tap_to_change_switch_label_1),
color = FirefoxTheme.colors.textPrimary, color = FirefoxTheme.colors.textPrimary,
fontSize = 18.sp, fontSize = 18.sp,
modifier = Modifier.padding(start = 4.dp) modifier = Modifier
.weight(0.8f)
) )
Switch( Switch(
checked = checked, checked = checked,
onCheckedChange = onCheckedChange, onCheckedChange = onCheckedChange,
@ -296,7 +296,6 @@ private fun WallpaperLogoSwitch(
) )
) )
} }
}
} }
@Preview @Preview

Loading…
Cancel
Save