diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/appbar/BitwardenSearchTopAppBar.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/appbar/BitwardenSearchTopAppBar.kt index f810fc3ce..0b53e3e2b 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/appbar/BitwardenSearchTopAppBar.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/appbar/BitwardenSearchTopAppBar.kt @@ -24,6 +24,7 @@ import com.x8bit.bitwarden.R import com.x8bit.bitwarden.ui.platform.base.util.mirrorIfRtl import com.x8bit.bitwarden.ui.platform.base.util.tabNavigation import com.x8bit.bitwarden.ui.platform.components.button.BitwardenStandardIconButton +import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme /** * Represents a Bitwarden styled [TopAppBar] that assumes the following components: @@ -74,6 +75,7 @@ fun BitwardenSearchTopAppBar( focusedIndicatorColor = Color.Transparent, unfocusedIndicatorColor = Color.Transparent, ), + textStyle = BitwardenTheme.typography.bodyLarge, placeholder = { Text(text = placeholder) }, value = searchTerm, singleLine = true, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenHiddenPasswordField.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenHiddenPasswordField.kt index 51240912e..2c318eea0 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenHiddenPasswordField.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenHiddenPasswordField.kt @@ -27,7 +27,7 @@ fun BitwardenHiddenPasswordField( ) { OutlinedTextField( modifier = modifier, - textStyle = BitwardenTheme.typography.bodyLarge, + textStyle = BitwardenTheme.typography.sensitiveInfoSmall, label = { Text(text = label) }, value = value, onValueChange = { }, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenTextField.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenTextField.kt index 948c87615..d7cf3bf1e 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenTextField.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenTextField.kt @@ -2,7 +2,6 @@ package com.x8bit.bitwarden.ui.platform.components.field import androidx.compose.foundation.text.KeyboardOptions import androidx.compose.material3.Icon -import androidx.compose.material3.LocalTextStyle import androidx.compose.material3.MaterialTheme import androidx.compose.material3.OutlinedTextField import androidx.compose.material3.Text @@ -61,7 +60,7 @@ fun BitwardenTextField( singleLine: Boolean = true, readOnly: Boolean = false, enabled: Boolean = true, - textStyle: TextStyle? = null, + textStyle: TextStyle = BitwardenTheme.typography.bodyLarge, shouldAddCustomLineBreaks: Boolean = false, keyboardType: KeyboardType = KeyboardType.Text, isError: Boolean = false, @@ -70,12 +69,11 @@ fun BitwardenTextField( ) { var widthPx by remember { mutableIntStateOf(0) } val focusRequester = remember { FocusRequester() } - val currentTextStyle = textStyle ?: LocalTextStyle.current val formattedText = if (shouldAddCustomLineBreaks) { value.withLineBreaksAtWidth( // Adjust for built in padding widthPx = widthPx - 16.dp.toPx(), - monospacedTextStyle = currentTextStyle, + monospacedTextStyle = textStyle, ) } else { value @@ -114,7 +112,7 @@ fun BitwardenTextField( onValueChange = onValueChange, singleLine = singleLine, readOnly = readOnly, - textStyle = currentTextStyle, + textStyle = textStyle, keyboardOptions = KeyboardOptions.Default.copy(keyboardType = keyboardType), isError = isError, visualTransformation = visualTransformation, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenTextFieldWithActions.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenTextFieldWithActions.kt index 0094755bd..d4209e8c3 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenTextFieldWithActions.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/field/BitwardenTextFieldWithActions.kt @@ -49,7 +49,7 @@ fun BitwardenTextFieldWithActions( value: String, onValueChange: (String) -> Unit, modifier: Modifier = Modifier, - textStyle: TextStyle? = null, + textStyle: TextStyle = BitwardenTheme.typography.bodyLarge, shouldAddCustomLineBreaks: Boolean = false, visualTransformation: VisualTransformation = VisualTransformation.None, readOnly: Boolean = false, diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/slider/BitwardenSlider.kt b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/slider/BitwardenSlider.kt index cef2c7a8a..8f6847879 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/slider/BitwardenSlider.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/platform/components/slider/BitwardenSlider.kt @@ -74,6 +74,7 @@ fun BitwardenSlider( ) { OutlinedTextField( value = sliderValue.toString(), + textStyle = BitwardenTheme.typography.bodyLarge, readOnly = true, onValueChange = { }, label = {