MCPcopy Index your code
hub / github.com/NativeScript/NativeScript / resetStyles

Function resetStyles

apps/ui/src/fonts-tests/button-page.ts:3–31  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

1import { unsetValue, Button, View, eachDescendant, StackLayout } from '@nativescript/core';
2
3export function resetStyles(args) {
4 var stackLayout = <StackLayout>args.object.parent.parent;
5 eachDescendant(stackLayout, function (v: View) {
6 v.style.fontFamily = unsetValue;
7 v.style.fontSize = unsetValue;
8 v.style.fontStyle = unsetValue;
9 v.style.fontWeight = unsetValue;
10 v.style.color = unsetValue;
11 v.style.textAlignment = unsetValue;
12 v.style.paddingLeft = unsetValue;
13 v.style.paddingRight = unsetValue;
14 v.style.paddingTop = unsetValue;
15 v.style.paddingBottom = unsetValue;
16 v.style.borderTopColor = unsetValue;
17 v.style.borderRightColor = unsetValue;
18 v.style.borderBottomColor = unsetValue;
19 v.style.borderLeftColor = unsetValue;
20 v.style.borderTopWidth = unsetValue;
21 v.style.borderRightWidth = unsetValue;
22 v.style.borderBottomWidth = unsetValue;
23 v.style.borderLeftWidth = unsetValue;
24 v.style.borderTopLeftRadius = unsetValue;
25 v.style.borderTopRightRadius = unsetValue;
26 v.style.borderBottomRightRadius = unsetValue;
27 v.style.borderBottomLeftRadius = unsetValue;
28
29 return true;
30 });
31}
32
33export function issue_ng_1453_loaded(args) {
34 var btn = <Button>args.object;

Callers

nothing calls this directly

Calls 1

eachDescendantFunction · 0.90

Tested by

no test coverage detected