Skip to content

Commit 363a8a2

Browse files
committed
Set text direction based on content
1 parent d8d0469 commit 363a8a2

File tree

1 file changed

+17
-0
lines changed
  • app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/type

1 file changed

+17
-0
lines changed

app/src/main/java/com/x8bit/bitwarden/ui/platform/theme/type/Typography.kt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography(
3737
trim = LineHeightStyle.Trim.None,
3838
),
3939
platformStyle = PlatformTextStyle(includeFontPadding = false),
40+
textDirection = TextDirection.Content,
4041
),
4142
displayMedium = TextStyle(
4243
fontSize = 44.sp,
@@ -49,6 +50,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography(
4950
trim = LineHeightStyle.Trim.None,
5051
),
5152
platformStyle = PlatformTextStyle(includeFontPadding = false),
53+
textDirection = TextDirection.Content,
5254
),
5355
displaySmall = TextStyle(
5456
fontSize = 36.sp,
@@ -61,6 +63,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography(
6163
trim = LineHeightStyle.Trim.None,
6264
),
6365
platformStyle = PlatformTextStyle(includeFontPadding = false),
66+
textDirection = TextDirection.Content,
6467
),
6568
headlineLarge = TextStyle(
6669
fontSize = 32.sp,
@@ -73,6 +76,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography(
7376
trim = LineHeightStyle.Trim.None,
7477
),
7578
platformStyle = PlatformTextStyle(includeFontPadding = false),
79+
textDirection = TextDirection.Content,
7680
),
7781
headlineMedium = TextStyle(
7882
fontSize = 28.sp,
@@ -85,6 +89,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography(
8589
trim = LineHeightStyle.Trim.None,
8690
),
8791
platformStyle = PlatformTextStyle(includeFontPadding = false),
92+
textDirection = TextDirection.Content,
8893
),
8994
headlineSmall = TextStyle(
9095
fontSize = 18.sp,
@@ -97,6 +102,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography(
97102
trim = LineHeightStyle.Trim.None,
98103
),
99104
platformStyle = PlatformTextStyle(includeFontPadding = false),
105+
textDirection = TextDirection.Content,
100106
),
101107
titleLarge = TextStyle(
102108
fontSize = 19.sp,
@@ -109,6 +115,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography(
109115
trim = LineHeightStyle.Trim.None,
110116
),
111117
platformStyle = PlatformTextStyle(includeFontPadding = false),
118+
textDirection = TextDirection.Content,
112119
),
113120
titleMedium = TextStyle(
114121
fontSize = 16.sp,
@@ -121,6 +128,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography(
121128
trim = LineHeightStyle.Trim.None,
122129
),
123130
platformStyle = PlatformTextStyle(includeFontPadding = false),
131+
textDirection = TextDirection.Content,
124132
),
125133
titleSmall = TextStyle(
126134
fontSize = 14.sp,
@@ -133,6 +141,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography(
133141
trim = LineHeightStyle.Trim.None,
134142
),
135143
platformStyle = PlatformTextStyle(includeFontPadding = false),
144+
textDirection = TextDirection.Content,
136145
),
137146
bodyLarge = TextStyle(
138147
fontSize = 15.sp,
@@ -145,6 +154,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography(
145154
trim = LineHeightStyle.Trim.None,
146155
),
147156
platformStyle = PlatformTextStyle(includeFontPadding = false),
157+
textDirection = TextDirection.Content,
148158
),
149159
bodyMedium = TextStyle(
150160
fontSize = 13.sp,
@@ -157,6 +167,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography(
157167
trim = LineHeightStyle.Trim.None,
158168
),
159169
platformStyle = PlatformTextStyle(includeFontPadding = false),
170+
textDirection = TextDirection.Content,
160171
),
161172
bodyMediumEmphasis = TextStyle(
162173
fontSize = 13.sp,
@@ -169,6 +180,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography(
169180
trim = LineHeightStyle.Trim.None,
170181
),
171182
platformStyle = PlatformTextStyle(includeFontPadding = false),
183+
textDirection = TextDirection.Content,
172184
),
173185
bodySmall = TextStyle(
174186
fontSize = 12.sp,
@@ -181,6 +193,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography(
181193
trim = LineHeightStyle.Trim.None,
182194
),
183195
platformStyle = PlatformTextStyle(includeFontPadding = false),
196+
textDirection = TextDirection.Content,
184197
),
185198
labelLarge = TextStyle(
186199
fontSize = 14.sp,
@@ -193,6 +206,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography(
193206
trim = LineHeightStyle.Trim.None,
194207
),
195208
platformStyle = PlatformTextStyle(includeFontPadding = false),
209+
textDirection = TextDirection.Content,
196210
),
197211
labelMedium = TextStyle(
198212
fontSize = 12.sp,
@@ -205,6 +219,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography(
205219
trim = LineHeightStyle.Trim.None,
206220
),
207221
platformStyle = PlatformTextStyle(includeFontPadding = false),
222+
textDirection = TextDirection.Content,
208223
),
209224
labelSmall = TextStyle(
210225
fontSize = 12.sp,
@@ -217,6 +232,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography(
217232
trim = LineHeightStyle.Trim.None,
218233
),
219234
platformStyle = PlatformTextStyle(includeFontPadding = false),
235+
textDirection = TextDirection.Content,
220236
),
221237
sensitiveInfoSmall = TextStyle(
222238
fontSize = 14.sp,
@@ -255,6 +271,7 @@ val bitwardenTypography: BitwardenTypography = BitwardenTypography(
255271
trim = LineHeightStyle.Trim.None,
256272
),
257273
platformStyle = PlatformTextStyle(includeFontPadding = false),
274+
textDirection = TextDirection.Content,
258275
),
259276
)
260277

0 commit comments

Comments
 (0)