tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit b79bbc6e31b531eb93a10673c2137b87f3344b52
parent 26cd976bff0617e3a86d2615070fae2e4b22d814
Author: Gabriel Luong <gabriel.luong@gmail.com>
Date:   Wed, 10 Dec 2025 15:33:07 +0000

Bug 2004511 - Part 7: Migrate UnlockPrivateTabsScreen to use M3 color tokens r=android-reviewers,007

Differential Revision: https://phabricator.services.mozilla.com/D275384

Diffstat:
Mmobile/android/fenix/app/src/main/java/org/mozilla/fenix/pbmlock/UnlockPrivateTabsScreen.kt | 36++++++++++++++----------------------
1 file changed, 14 insertions(+), 22 deletions(-)

diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/pbmlock/UnlockPrivateTabsScreen.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/pbmlock/UnlockPrivateTabsScreen.kt @@ -6,7 +6,6 @@ package org.mozilla.fenix.pbmlock import android.content.res.Configuration import androidx.compose.foundation.Image -import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row @@ -17,15 +16,14 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable -import androidx.compose.runtime.LaunchedEffect import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource -import androidx.compose.ui.text.style.TextAlign import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import mozilla.components.compose.base.button.FilledButton @@ -56,23 +54,19 @@ internal fun UnlockPrivateTabsScreen( onLeaveClicked: () -> Unit, showNegativeButton: Boolean, ) { - Column( - modifier = Modifier - .fillMaxSize() - .background(MaterialTheme.colorScheme.surface) - .padding(bottom = 32.dp), - horizontalAlignment = Alignment.CenterHorizontally, - verticalArrangement = Arrangement.SpaceBetween, - ) { - Spacer(modifier = Modifier.height(32.dp)) - - Header() - - Footer(onUnlockClicked, onLeaveClicked, showNegativeButton) - - LaunchedEffect(Unit) { - // Record telemetry event here as - // part of https://mozilla-hub.atlassian.net/browse/FXDROID-3385 + Surface { + Column( + modifier = Modifier + .fillMaxSize() + .padding(bottom = 32.dp), + horizontalAlignment = Alignment.CenterHorizontally, + verticalArrangement = Arrangement.SpaceBetween, + ) { + Spacer(modifier = Modifier.height(32.dp)) + + Header() + + Footer(onUnlockClicked, onLeaveClicked, showNegativeButton) } } } @@ -89,8 +83,6 @@ private fun Header() { Text( text = stringResource(id = R.string.pbm_authentication_unlock_private_tabs), - color = FirefoxTheme.colors.textPrimary, - textAlign = TextAlign.Center, style = FirefoxTheme.typography.headline6, maxLines = 1, )