Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resources/android/DatePickerRenderer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ object DatePickerRenderer {
)
},
modifier = Modifier.fillMaxWidth(),
textStyle = TextStyle(color = theme.onSurface),
textStyle = TextStyle(color = theme.onSurface, fontFamily = nuiDefaultFontFamily()),
colors = OutlinedTextFieldDefaults.colors(
errorBorderColor = theme.destructive,
errorSupportingTextColor = theme.destructive,
Expand Down
2 changes: 1 addition & 1 deletion resources/android/SelectRenderer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ object SelectRenderer {
modifier = Modifier
.then(if (node.layout?.widthMode == SizeMode.FILL) Modifier.fillMaxWidth() else Modifier)
.menuAnchor(ExposedDropdownMenuAnchorType.PrimaryNotEditable),
textStyle = TextStyle(color = theme.onSurface),
textStyle = TextStyle(color = theme.onSurface, fontFamily = nuiDefaultFontFamily()),
colors = OutlinedTextFieldDefaults.colors(
errorBorderColor = theme.destructive,
errorLabelColor = theme.destructive,
Expand Down
12 changes: 12 additions & 0 deletions tests/PickerFontTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

it('draws an Android picker value in the theme font', function (string $file) {
$source = file_get_contents(dirname(__DIR__)."/resources/android/{$file}");

expect($source)
->toContain('textStyle = TextStyle(color = theme.onSurface, fontFamily = nuiDefaultFontFamily())')
->not->toContain('textStyle = TextStyle(color = theme.onSurface),');
})->with([
'DatePickerRenderer.kt',
'SelectRenderer.kt',
]);
Loading