mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +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 view = require("ui/core/view");
|
||||
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) {
|
||||
v.style._resetValue(style.fontFamilyProperty);
|
||||
v.style._resetValue(style.fontSizeProperty);
|
||||
|
@ -1,13 +1,12 @@
|
||||
<Page>
|
||||
<StackLayout>
|
||||
<Button text="RESET" tap="resetStyles"/>
|
||||
|
||||
<Button text="no align" />
|
||||
<Button text="left" style="text-align: left" />
|
||||
<Button text="center" style="text-align: center" />
|
||||
<Button text="right" style="text-align: right" />
|
||||
|
||||
<WrapLayout>
|
||||
<Button text="RESET" tap="resetStyles"/>
|
||||
<Button text="normal" />
|
||||
<Button text="color" style="color: green"/>
|
||||
<Button text="size" style="font-size: 32" />
|
||||
|
Reference in New Issue
Block a user