mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat(ios): new a11y properties for managing font scale (#10260)
This commit is contained in:
committed by
GitHub
parent
2f9e5c0b84
commit
7aaa1d899d
@@ -582,13 +582,17 @@ export function test_setting_font_properties_sets_native_font() {
|
||||
|
||||
export function test_native_font_size_with_a11y_font_scale() {
|
||||
if (isIOS) {
|
||||
const page = helper.getCurrentPage();
|
||||
const testView = new Label();
|
||||
const deviceFontScaleMock = 4.0;
|
||||
|
||||
page.content = testView;
|
||||
const page = helper.getCurrentPage();
|
||||
const testView = new Label();
|
||||
const layout = new StackLayout();
|
||||
layout.addChild(testView);
|
||||
|
||||
testView.style._fontScale = deviceFontScaleMock;
|
||||
page.content = layout;
|
||||
|
||||
layout.style.iosAccessibilityAdjustsFontSize = true;
|
||||
layout.style.fontScaleInternal = deviceFontScaleMock;
|
||||
|
||||
const nativeFontSize = testView.nativeTextViewProtected.font.pointSize;
|
||||
const expectedNativeFontSize = testView.style.fontInternal.fontSize * deviceFontScaleMock;
|
||||
|
||||
Reference in New Issue
Block a user