tor-browser

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

commit 7090751a4e545473f04dcda55530a424c32ea3bc
parent 89e54d4f915e95e52e0e9a96b5f33068de375ce0
Author: Gabriel Luong <gabriel.luong@gmail.com>
Date:   Fri, 21 Nov 2025 17:15:25 +0000

Bug 1993368 - Part 11: Migrate ClickableSubstringLInk to use M3 Acorn color tokens r=android-reviewers,007

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

Diffstat:
Mmobile/android/fenix/app/src/main/java/org/mozilla/fenix/compose/ClickableSubstringLink.kt | 10++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/compose/ClickableSubstringLink.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/compose/ClickableSubstringLink.kt @@ -4,13 +4,11 @@ package org.mozilla.fenix.compose -import androidx.compose.foundation.background -import androidx.compose.foundation.layout.Box import androidx.compose.foundation.text.ClickableText import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.runtime.Composable -import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color import androidx.compose.ui.text.SpanStyle import androidx.compose.ui.text.TextStyle @@ -36,7 +34,7 @@ import org.mozilla.fenix.theme.FirefoxTheme fun ClickableSubstringLink( text: String, textStyle: TextStyle = FirefoxTheme.typography.caption, - textColor: Color = FirefoxTheme.colors.textPrimary, + textColor: Color = MaterialTheme.colorScheme.onSurface, linkTextColor: Color = MaterialTheme.colorScheme.tertiary, linkTextDecoration: TextDecoration? = null, clickableStartIndex: Int, @@ -96,13 +94,13 @@ private fun ClickableSubstringTextPreview() { val text = "This text contains a link" FirefoxTheme { - Box(modifier = Modifier.background(color = FirefoxTheme.colors.layer1)) { + Surface { ClickableSubstringLink( text = text, linkTextDecoration = TextDecoration.Underline, clickableStartIndex = text.indexOf("link"), clickableEndIndex = text.length, - ) { } + ) {} } } }