MCPcopy Create free account
hub / github.com/NativeScript/NativeScript / fontScaleChanged

Function fontScaleChanged

packages/core/application/application.ios.ts:1270–1282  ·  view source on GitHub ↗
(origFontScale: number)

Source from the content-addressed store, hash-verified

1268export const AndroidApplication = undefined;
1269
1270function fontScaleChanged(origFontScale: number) {
1271 const oldValue = getFontScale();
1272 setFontScale(getClosestValidFontScale(origFontScale));
1273 const currentFontScale = getFontScale();
1274
1275 if (oldValue !== currentFontScale) {
1276 Application.notify({
1277 eventName: Application.fontScaleChangedEvent,
1278 object: Application,
1279 newValue: currentFontScale,
1280 });
1281 }
1282}
1283
1284export function getCurrentFontScale(): number {
1285 setupConfigListener();

Callers 3

contentSizeUpdatedFunction · 0.70
useIOSFontScaleFunction · 0.70
setupConfigListenerFunction · 0.70

Calls 4

getFontScaleFunction · 0.90
setFontScaleFunction · 0.90
getClosestValidFontScaleFunction · 0.90
notifyMethod · 0.65

Tested by

no test coverage detected