[fenix] For https://github.com/mozilla-mobile/fenix/issues/25291 - Swap the new TextButton composable into WallpaperSettings

pull/600/head
Noah Bond 2 years ago committed by mergify[bot]
parent e07652bf38
commit df77449cbf

@ -31,7 +31,6 @@ import androidx.compose.material.Surface
import androidx.compose.material.Switch import androidx.compose.material.Switch
import androidx.compose.material.SwitchDefaults import androidx.compose.material.SwitchDefaults
import androidx.compose.material.Text import androidx.compose.material.Text
import androidx.compose.material.TextButton
import androidx.compose.material.rememberScaffoldState import androidx.compose.material.rememberScaffoldState
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.runtime.DisposableEffect import androidx.compose.runtime.DisposableEffect
@ -55,12 +54,12 @@ import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp import androidx.compose.ui.unit.sp
import kotlinx.coroutines.launch import kotlinx.coroutines.launch
import org.mozilla.fenix.R import org.mozilla.fenix.R
import org.mozilla.fenix.compose.button.TextButton
import org.mozilla.fenix.ext.components import org.mozilla.fenix.ext.components
import org.mozilla.fenix.theme.FirefoxTheme import org.mozilla.fenix.theme.FirefoxTheme
import org.mozilla.fenix.theme.Theme import org.mozilla.fenix.theme.Theme
import org.mozilla.fenix.wallpapers.Wallpaper import org.mozilla.fenix.wallpapers.Wallpaper
import org.mozilla.fenix.wallpapers.WallpaperManager import org.mozilla.fenix.wallpapers.WallpaperManager
import java.util.Locale
/** /**
* The screen for controlling settings around Wallpapers. When a new wallpaper is selected, * The screen for controlling settings around Wallpapers. When a new wallpaper is selected,
@ -143,18 +142,11 @@ private fun WallpaperSnackbar(
}, },
action = { action = {
TextButton( TextButton(
modifier = Modifier.padding(start = 16.dp, end = 16.dp, top = 8.dp, bottom = 8.dp), text = stringResource(R.string.wallpaper_updated_snackbar_action),
onClick = onViewWallpaper, onClick = onViewWallpaper,
) { modifier = Modifier.padding(all = 8.dp),
Text( textColor = FirefoxTheme.colors.textOnColorPrimary,
text = stringResource(R.string.wallpaper_updated_snackbar_action).uppercase( )
Locale.getDefault()
),
color = FirefoxTheme.colors.textOnColorPrimary,
fontFamily = FontFamily(Font(R.font.metropolis_medium)),
fontSize = 14.sp,
)
}
}, },
) )
} }

Loading…
Cancel
Save