Skip to content

Commit d7f26e4

Browse files
committed
Don't use TextAlign.Start, fallback to text style alignment
1 parent 511c63e commit d7f26e4

File tree

9 files changed

+0
-25
lines changed

9 files changed

+0
-25
lines changed

app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/enterprisesignon/EnterpriseSignOnScreen.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import androidx.compose.ui.Modifier
2020
import androidx.compose.ui.input.nestedscroll.nestedScroll
2121
import androidx.compose.ui.platform.testTag
2222
import androidx.compose.ui.res.stringResource
23-
import androidx.compose.ui.text.style.TextAlign
2423
import androidx.compose.ui.unit.dp
2524
import androidx.hilt.navigation.compose.hiltViewModel
2625
import androidx.lifecycle.compose.collectAsStateWithLifecycle
@@ -133,7 +132,6 @@ private fun EnterpriseSignOnScreenContent(
133132
Spacer(modifier = Modifier.height(height = 12.dp))
134133
Text(
135134
text = stringResource(id = R.string.log_in_sso_summary),
136-
textAlign = TextAlign.Start,
137135
style = BitwardenTheme.typography.bodyMedium,
138136
color = BitwardenTheme.colorScheme.text.primary,
139137
modifier = Modifier

app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/loginwithdevice/LoginWithDeviceScreen.kt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import androidx.compose.ui.input.nestedscroll.nestedScroll
2727
import androidx.compose.ui.platform.LocalContext
2828
import androidx.compose.ui.platform.testTag
2929
import androidx.compose.ui.res.stringResource
30-
import androidx.compose.ui.text.style.TextAlign
3130
import androidx.compose.ui.unit.dp
3231
import androidx.hilt.navigation.compose.hiltViewModel
3332
import androidx.lifecycle.compose.collectAsStateWithLifecycle
@@ -136,7 +135,6 @@ private fun LoginWithDeviceScreenContent(
136135
) {
137136
Text(
138137
text = state.title(),
139-
textAlign = TextAlign.Start,
140138
style = BitwardenTheme.typography.headlineMedium,
141139
color = BitwardenTheme.colorScheme.text.primary,
142140
modifier = Modifier
@@ -148,7 +146,6 @@ private fun LoginWithDeviceScreenContent(
148146

149147
Text(
150148
text = state.subtitle(),
151-
textAlign = TextAlign.Start,
152149
style = BitwardenTheme.typography.bodyMedium,
153150
color = BitwardenTheme.colorScheme.text.primary,
154151
modifier = Modifier
@@ -160,7 +157,6 @@ private fun LoginWithDeviceScreenContent(
160157

161158
Text(
162159
text = state.description(),
163-
textAlign = TextAlign.Start,
164160
style = BitwardenTheme.typography.bodyMedium,
165161
color = BitwardenTheme.colorScheme.text.primary,
166162
modifier = Modifier
@@ -172,7 +168,6 @@ private fun LoginWithDeviceScreenContent(
172168

173169
Text(
174170
text = stringResource(id = R.string.fingerprint_phrase),
175-
textAlign = TextAlign.Start,
176171
style = BitwardenTheme.typography.titleLarge,
177172
color = BitwardenTheme.colorScheme.text.primary,
178173
modifier = Modifier
@@ -184,7 +179,6 @@ private fun LoginWithDeviceScreenContent(
184179

185180
Text(
186181
text = state.fingerprintPhrase,
187-
textAlign = TextAlign.Start,
188182
color = BitwardenTheme.colorScheme.text.codePink,
189183
style = BitwardenTheme.typography.sensitiveInfoSmall,
190184
minLines = 2,
@@ -223,7 +217,6 @@ private fun LoginWithDeviceScreenContent(
223217

224218
Text(
225219
text = state.otherOptions(),
226-
textAlign = TextAlign.Start,
227220
style = BitwardenTheme.typography.bodyMedium,
228221
color = BitwardenTheme.colorScheme.text.primary,
229222
modifier = Modifier

app/src/main/java/com/x8bit/bitwarden/ui/auth/feature/vaultunlock/VaultUnlockScreen.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import androidx.compose.ui.platform.LocalFocusManager
3131
import androidx.compose.ui.platform.testTag
3232
import androidx.compose.ui.res.stringResource
3333
import androidx.compose.ui.text.input.ImeAction
34-
import androidx.compose.ui.text.style.TextAlign
3534
import androidx.compose.ui.unit.dp
3635
import androidx.hilt.navigation.compose.hiltViewModel
3736
import androidx.lifecycle.compose.collectAsStateWithLifecycle
@@ -333,7 +332,6 @@ fun VaultUnlockScreen(
333332
} else if (state.showBiometricInvalidatedMessage) {
334333
Text(
335334
text = stringResource(R.string.account_biometric_invalidated),
336-
textAlign = TextAlign.Start,
337335
style = BitwardenTheme.typography.bodyMedium,
338336
color = BitwardenTheme.colorScheme.status.error,
339337
modifier = Modifier.standardHorizontalMargin(),

app/src/main/java/com/x8bit/bitwarden/ui/platform/components/card/BitwardenInfoCalloutCard.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import androidx.compose.foundation.layout.padding
55
import androidx.compose.material3.Text
66
import androidx.compose.runtime.Composable
77
import androidx.compose.ui.Modifier
8-
import androidx.compose.ui.text.style.TextAlign
98
import androidx.compose.ui.tooling.preview.Preview
109
import androidx.compose.ui.unit.dp
1110
import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
@@ -23,7 +22,6 @@ fun BitwardenInfoCalloutCard(
2322
) {
2423
Text(
2524
text = text,
26-
textAlign = TextAlign.Start,
2725
style = BitwardenTheme.typography.bodyMedium,
2826
color = BitwardenTheme.colorScheme.text.primary,
2927
modifier = modifier

app/src/main/java/com/x8bit/bitwarden/ui/platform/components/text/BitwardenClickableText.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import androidx.compose.ui.draw.clip
2121
import androidx.compose.ui.graphics.Color
2222
import androidx.compose.ui.graphics.painter.Painter
2323
import androidx.compose.ui.text.TextStyle
24-
import androidx.compose.ui.text.style.TextAlign
2524
import androidx.compose.ui.tooling.preview.Preview
2625
import androidx.compose.ui.unit.Dp
2726
import androidx.compose.ui.unit.dp
@@ -75,7 +74,6 @@ fun BitwardenClickableText(
7574
}
7675
Text(
7776
text = label,
78-
textAlign = TextAlign.Start,
7977
color = color,
8078
style = style,
8179
)

app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/deleteaccountconfirmation/DeleteAccountConfirmationScreen.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import androidx.compose.ui.platform.LocalContext
2323
import androidx.compose.ui.res.stringResource
2424
import androidx.compose.ui.text.input.ImeAction
2525
import androidx.compose.ui.text.input.KeyboardType
26-
import androidx.compose.ui.text.style.TextAlign
2726
import androidx.compose.ui.tooling.preview.Preview
2827
import androidx.compose.ui.unit.dp
2928
import androidx.hilt.navigation.compose.hiltViewModel
@@ -139,7 +138,6 @@ private fun DeleteAccountConfirmationContent(
139138
) {
140139
Text(
141140
text = stringResource(id = R.string.a_verification_code_was_sent_to_your_email),
142-
textAlign = TextAlign.Start,
143141
style = BitwardenTheme.typography.bodyMedium,
144142
color = BitwardenTheme.colorScheme.text.primary,
145143
modifier = Modifier
@@ -162,7 +160,6 @@ private fun DeleteAccountConfirmationContent(
162160
Spacer(modifier = Modifier.height(12.dp))
163161
Text(
164162
text = stringResource(id = R.string.confirm_your_identity),
165-
textAlign = TextAlign.Start,
166163
style = BitwardenTheme.typography.bodyMedium,
167164
color = BitwardenTheme.colorScheme.text.primary,
168165
modifier = Modifier

app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/loginapproval/LoginApprovalScreen.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import androidx.compose.ui.platform.testTag
2525
import androidx.compose.ui.res.stringResource
2626
import androidx.compose.ui.semantics.semantics
2727
import androidx.compose.ui.semantics.testTag
28-
import androidx.compose.ui.text.style.TextAlign
2928
import androidx.compose.ui.unit.dp
3029
import androidx.hilt.navigation.compose.hiltViewModel
3130
import androidx.lifecycle.compose.collectAsStateWithLifecycle
@@ -183,7 +182,6 @@ private fun LoginApprovalContent(
183182

184183
Text(
185184
text = state.fingerprint,
186-
textAlign = TextAlign.Start,
187185
color = BitwardenTheme.colorScheme.text.codePink,
188186
style = BitwardenTheme.typography.sensitiveInfoSmall,
189187
modifier = Modifier

app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/accountsecurity/pendingrequests/PendingRequestsScreen.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,6 @@ private fun PendingRequestItem(
288288
text = stringResource(id = R.string.fingerprint_phrase),
289289
style = BitwardenTheme.typography.labelMedium,
290290
color = BitwardenTheme.colorScheme.text.primary,
291-
textAlign = TextAlign.Start,
292291
modifier = Modifier.fillMaxWidth(),
293292
)
294293

@@ -298,7 +297,6 @@ private fun PendingRequestItem(
298297
text = fingerprintPhrase,
299298
color = BitwardenTheme.colorScheme.text.codePink,
300299
style = BitwardenTheme.typography.sensitiveInfoSmall,
301-
textAlign = TextAlign.Start,
302300
modifier = Modifier
303301
.testTag("FingerprintValueLabel")
304302
.fillMaxWidth(),
@@ -315,7 +313,6 @@ private fun PendingRequestItem(
315313
text = platform,
316314
style = BitwardenTheme.typography.bodyMedium,
317315
color = BitwardenTheme.colorScheme.text.secondary,
318-
textAlign = TextAlign.Start,
319316
)
320317
Spacer(modifier = Modifier.width(width = 16.dp))
321318
Text(

app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/settings/exportvault/ExportVaultScreen.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import androidx.compose.ui.platform.LocalContext
2626
import androidx.compose.ui.platform.testTag
2727
import androidx.compose.ui.res.stringResource
2828
import androidx.compose.ui.text.input.KeyboardType
29-
import androidx.compose.ui.text.style.TextAlign
3029
import androidx.compose.ui.unit.dp
3130
import androidx.hilt.navigation.compose.hiltViewModel
3231
import androidx.lifecycle.compose.collectAsStateWithLifecycle
@@ -276,7 +275,6 @@ private fun ExportVaultScreenContent(
276275

277276
Text(
278277
text = stringResource(id = R.string.send_verification_code_to_email),
279-
textAlign = TextAlign.Start,
280278
style = BitwardenTheme.typography.bodyMedium,
281279
color = BitwardenTheme.colorScheme.text.primary,
282280
modifier = Modifier

0 commit comments

Comments
 (0)