mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
Update test page.
This commit is contained in:
@ -2,7 +2,7 @@ import stack = require("ui/layouts/stack-layout");
|
|||||||
import style = require("ui/styling/style");
|
import style = require("ui/styling/style");
|
||||||
import view = require("ui/core/view");
|
import view = require("ui/core/view");
|
||||||
export function resetStyles(args) {
|
export function resetStyles(args) {
|
||||||
var stackLayout = <stack.StackLayout>args.object.parent;
|
var stackLayout = <stack.StackLayout>args.object.parent.parent;
|
||||||
view.eachDescendant(stackLayout, function (v: view.View) {
|
view.eachDescendant(stackLayout, function (v: view.View) {
|
||||||
v.style._resetValue(style.fontFamilyProperty);
|
v.style._resetValue(style.fontFamilyProperty);
|
||||||
v.style._resetValue(style.fontSizeProperty);
|
v.style._resetValue(style.fontSizeProperty);
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
<Page>
|
<Page>
|
||||||
<StackLayout>
|
<StackLayout>
|
||||||
<Button text="RESET" tap="resetStyles"/>
|
|
||||||
|
|
||||||
<Button text="no align" />
|
<Button text="no align" />
|
||||||
<Button text="left" style="text-align: left" />
|
<Button text="left" style="text-align: left" />
|
||||||
<Button text="center" style="text-align: center" />
|
<Button text="center" style="text-align: center" />
|
||||||
<Button text="right" style="text-align: right" />
|
<Button text="right" style="text-align: right" />
|
||||||
|
|
||||||
<WrapLayout>
|
<WrapLayout>
|
||||||
|
<Button text="RESET" tap="resetStyles"/>
|
||||||
<Button text="normal" />
|
<Button text="normal" />
|
||||||
<Button text="color" style="color: green"/>
|
<Button text="color" style="color: green"/>
|
||||||
<Button text="size" style="font-size: 32" />
|
<Button text="size" style="font-size: 32" />
|
||||||
|
Reference in New Issue
Block a user