mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 20:11:24 +08:00
6
apps/app/ui-tests-app/css/all-non-uniform-border.css
Normal file
6
apps/app/ui-tests-app/css/all-non-uniform-border.css
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
.s0 {
|
||||||
|
border-width: 1 2 5 10; border-color: red green blue yellow;
|
||||||
|
width: 100;
|
||||||
|
height: 100;
|
||||||
|
font-size: 10;
|
||||||
|
}
|
29
apps/app/ui-tests-app/css/all-non-uniform-border.xml
Normal file
29
apps/app/ui-tests-app/css/all-non-uniform-border.xml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<Page>
|
||||||
|
<GridLayout rows="*,*,*,*,*,*" columns="*,*,*">
|
||||||
|
<Button class="s0" row="0" col="0" text="Button"/>
|
||||||
|
<Label class="s0" row="0" col="1" text="Label"/>
|
||||||
|
<TextField class="s0" row="0" col="2" text="TextField"/>
|
||||||
|
<TextView class="s0" row="1" col="0" text="TextView"/>
|
||||||
|
<SearchBar class="s0" row="1" col="1" text="SearchBar"/>
|
||||||
|
<Switch class="s0" row="1" col="2" checked="true"/>
|
||||||
|
<Slider class="s0" row="2" col="0" minValue="0" maxValue="100" value="50"/>
|
||||||
|
<Progress class="s0" row="2" col="1" maxValue="100" value="50"/>
|
||||||
|
<ActivityIndicator class="s0" row="2" col="2" busy="true"/>
|
||||||
|
<Image class="s0" row="3" col="0" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||||
|
<ListView class="s0" row="3" col="1" items="ListView"/>
|
||||||
|
<HtmlView class="s0" row="3" col="2" html="<h1>HtmlView</h1>"/>
|
||||||
|
<WebView class="s0" row="4" col="0" src="https://www.nativescript.org/"/>
|
||||||
|
<SegmentedBar class="s0" row="4" col="1">
|
||||||
|
<SegmentedBar.items>
|
||||||
|
<SegmentedBarItem title="SB 1" />
|
||||||
|
<SegmentedBarItem title="SB 2" />
|
||||||
|
</SegmentedBar.items>
|
||||||
|
</SegmentedBar>
|
||||||
|
<DatePicker class="s0" row="4" col="2" year="1980" month="2" day="9"/>
|
||||||
|
<TimePicker class="s0" row="5" col="0" hour="5" minute="30"/>
|
||||||
|
<ListPicker class="s0" row="5" col="1" items="123"/>
|
||||||
|
<ScrollView class="s0" row="5" col="2">
|
||||||
|
<Label text="ScrollView" width="160" height="160" style.backgroundColor="gray"/>
|
||||||
|
</ScrollView>
|
||||||
|
</GridLayout>
|
||||||
|
</Page>
|
6
apps/app/ui-tests-app/css/all-uniform-border.css
Normal file
6
apps/app/ui-tests-app/css/all-uniform-border.css
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
.s0 {
|
||||||
|
border-width: 5; border-color: red; border-radius: 5;
|
||||||
|
width: 100;
|
||||||
|
height: 100;
|
||||||
|
font-size: 10;
|
||||||
|
}
|
29
apps/app/ui-tests-app/css/all-uniform-border.xml
Normal file
29
apps/app/ui-tests-app/css/all-uniform-border.xml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
<Page>
|
||||||
|
<GridLayout rows="*,*,*,*,*,*" columns="*,*,*">
|
||||||
|
<Button class="s0" row="0" col="0" text="Button"/>
|
||||||
|
<Label class="s0" row="0" col="1" text="Label"/>
|
||||||
|
<TextField class="s0" row="0" col="2" text="TextField"/>
|
||||||
|
<TextView class="s0" row="1" col="0" text="TextView"/>
|
||||||
|
<SearchBar class="s0" row="1" col="1" text="SearchBar"/>
|
||||||
|
<Switch class="s0" row="1" col="2" checked="true"/>
|
||||||
|
<Slider class="s0" row="2" col="0" minValue="0" maxValue="100" value="50"/>
|
||||||
|
<Progress class="s0" row="2" col="1" maxValue="100" value="50"/>
|
||||||
|
<ActivityIndicator class="s0" row="2" col="2" busy="true"/>
|
||||||
|
<Image class="s0" row="3" col="0" src="~/ui-tests-app/image-view/gravatar.png" stretch="fill"/>
|
||||||
|
<ListView class="s0" row="3" col="1" items="ListView"/>
|
||||||
|
<HtmlView class="s0" row="3" col="2" html="<h1>HtmlView</h1>"/>
|
||||||
|
<WebView class="s0" row="4" col="0" src="https://www.nativescript.org/"/>
|
||||||
|
<SegmentedBar class="s0" row="4" col="1">
|
||||||
|
<SegmentedBar.items>
|
||||||
|
<SegmentedBarItem title="SB 1" />
|
||||||
|
<SegmentedBarItem title="SB 2" />
|
||||||
|
</SegmentedBar.items>
|
||||||
|
</SegmentedBar>
|
||||||
|
<DatePicker class="s0" row="4" col="2" year="1980" month="2" day="9"/>
|
||||||
|
<TimePicker class="s0" row="5" col="0" hour="5" minute="30"/>
|
||||||
|
<ListPicker class="s0" row="5" col="1" items="123"/>
|
||||||
|
<ScrollView class="s0" row="5" col="2">
|
||||||
|
<Label text="ScrollView" width="160" height="160" style.backgroundColor="gray"/>
|
||||||
|
</ScrollView>
|
||||||
|
</GridLayout>
|
||||||
|
</Page>
|
@ -34,6 +34,8 @@ export function pageLoaded(args: EventData) {
|
|||||||
examples.set("image-border", "css/image-border");
|
examples.set("image-border", "css/image-border");
|
||||||
examples.set("layouts-border-overlap", "css/layouts-border-overlap");
|
examples.set("layouts-border-overlap", "css/layouts-border-overlap");
|
||||||
examples.set("measure-tests", "css/measure-tests");
|
examples.set("measure-tests", "css/measure-tests");
|
||||||
|
examples.set("all-uniform-border", "css/all-uniform-border");
|
||||||
|
examples.set("all-non-uniform-border", "css/all-non-uniform-border");
|
||||||
//examples.set("border-playground", "css/border-playground");
|
//examples.set("border-playground", "css/border-playground");
|
||||||
|
|
||||||
let viewModel = new SubMianPageViewModel(wrapLayout, examples);
|
let viewModel = new SubMianPageViewModel(wrapLayout, examples);
|
||||||
|
@ -78,21 +78,6 @@ export class ProgressStyler implements style.Styler {
|
|||||||
ProgressStyler.setBackgroundAndBorderProperty,
|
ProgressStyler.setBackgroundAndBorderProperty,
|
||||||
ProgressStyler.resetBackgroundAndBorderProperty), "Progress");
|
ProgressStyler.resetBackgroundAndBorderProperty), "Progress");
|
||||||
|
|
||||||
style.registerHandler(style.borderTopColorProperty, style.ignorePropertyHandler, "Progress");
|
|
||||||
style.registerHandler(style.borderRightColorProperty, style.ignorePropertyHandler, "Progress");
|
|
||||||
style.registerHandler(style.borderBottomColorProperty, style.ignorePropertyHandler, "Progress");
|
|
||||||
style.registerHandler(style.borderLeftColorProperty, style.ignorePropertyHandler, "Progress");
|
|
||||||
|
|
||||||
style.registerHandler(style.borderTopWidthProperty, style.ignorePropertyHandler, "Progress");
|
|
||||||
style.registerHandler(style.borderRightWidthProperty, style.ignorePropertyHandler, "Progress");
|
|
||||||
style.registerHandler(style.borderBottomWidthProperty, style.ignorePropertyHandler, "Progress");
|
|
||||||
style.registerHandler(style.borderLeftWidthProperty, style.ignorePropertyHandler, "Progress");
|
|
||||||
|
|
||||||
style.registerHandler(style.borderTopLeftRadiusProperty, style.ignorePropertyHandler, "Progress");
|
|
||||||
style.registerHandler(style.borderTopRightRadiusProperty, style.ignorePropertyHandler, "Progress");
|
|
||||||
style.registerHandler(style.borderBottomRightRadiusProperty, style.ignorePropertyHandler, "Progress");
|
|
||||||
style.registerHandler(style.borderBottomLeftRadiusProperty, style.ignorePropertyHandler, "Progress");
|
|
||||||
|
|
||||||
style.registerHandler(style.backgroundInternalProperty, style.ignorePropertyHandler, "Progress");
|
style.registerHandler(style.backgroundInternalProperty, style.ignorePropertyHandler, "Progress");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,6 +76,8 @@ export class ProgressStyler implements style.Styler {
|
|||||||
ProgressStyler.setBackgroundColorProperty,
|
ProgressStyler.setBackgroundColorProperty,
|
||||||
ProgressStyler.resetBackgroundColorProperty,
|
ProgressStyler.resetBackgroundColorProperty,
|
||||||
ProgressStyler.getBackgroundColorProperty), "Progress");
|
ProgressStyler.getBackgroundColorProperty), "Progress");
|
||||||
|
|
||||||
|
style.registerHandler(style.backgroundInternalProperty, style.ignorePropertyHandler, "Progress");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -278,6 +278,8 @@ export class SearchBarStyler implements style.Styler {
|
|||||||
SearchBarStyler.setFontInternalProperty,
|
SearchBarStyler.setFontInternalProperty,
|
||||||
SearchBarStyler.resetFontInternalProperty,
|
SearchBarStyler.resetFontInternalProperty,
|
||||||
SearchBarStyler.getNativeFontInternalValue), "SearchBar");
|
SearchBarStyler.getNativeFontInternalValue), "SearchBar");
|
||||||
|
|
||||||
|
style.registerHandler(style.backgroundInternalProperty, style.ignorePropertyHandler, "SearchBar");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static _getSearchViewTextView(bar: android.widget.SearchView): android.widget.TextView {
|
private static _getSearchViewTextView(bar: android.widget.SearchView): android.widget.TextView {
|
||||||
|
@ -239,6 +239,8 @@ export class SearchBarStyler implements style.Styler {
|
|||||||
SearchBarStyler.setFontInternalProperty,
|
SearchBarStyler.setFontInternalProperty,
|
||||||
SearchBarStyler.resetFontInternalProperty,
|
SearchBarStyler.resetFontInternalProperty,
|
||||||
SearchBarStyler.getNativeFontInternalValue), "SearchBar");
|
SearchBarStyler.getNativeFontInternalValue), "SearchBar");
|
||||||
|
|
||||||
|
style.registerHandler(style.backgroundInternalProperty, style.ignorePropertyHandler, "SearchBar");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,21 +127,6 @@ export class SliderStyler implements style.Styler {
|
|||||||
SliderStyler.setBackgroundAndBorderProperty,
|
SliderStyler.setBackgroundAndBorderProperty,
|
||||||
SliderStyler.resetBackgroundAndBorderProperty), "Slider");
|
SliderStyler.resetBackgroundAndBorderProperty), "Slider");
|
||||||
|
|
||||||
style.registerHandler(style.borderTopColorProperty, style.ignorePropertyHandler, "Slider");
|
|
||||||
style.registerHandler(style.borderRightColorProperty, style.ignorePropertyHandler, "Slider");
|
|
||||||
style.registerHandler(style.borderBottomColorProperty, style.ignorePropertyHandler, "Slider");
|
|
||||||
style.registerHandler(style.borderLeftColorProperty, style.ignorePropertyHandler, "Slider");
|
|
||||||
|
|
||||||
style.registerHandler(style.borderTopWidthProperty, style.ignorePropertyHandler, "Slider");
|
|
||||||
style.registerHandler(style.borderRightWidthProperty, style.ignorePropertyHandler, "Slider");
|
|
||||||
style.registerHandler(style.borderBottomWidthProperty, style.ignorePropertyHandler, "Slider");
|
|
||||||
style.registerHandler(style.borderLeftWidthProperty, style.ignorePropertyHandler, "Slider");
|
|
||||||
|
|
||||||
style.registerHandler(style.borderTopLeftRadiusProperty, style.ignorePropertyHandler, "Slider");
|
|
||||||
style.registerHandler(style.borderTopRightRadiusProperty, style.ignorePropertyHandler, "Slider");
|
|
||||||
style.registerHandler(style.borderBottomRightRadiusProperty, style.ignorePropertyHandler, "Slider");
|
|
||||||
style.registerHandler(style.borderBottomLeftRadiusProperty, style.ignorePropertyHandler, "Slider");
|
|
||||||
|
|
||||||
style.registerHandler(style.backgroundInternalProperty, style.ignorePropertyHandler, "Slider");
|
style.registerHandler(style.backgroundInternalProperty, style.ignorePropertyHandler, "Slider");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -81,21 +81,6 @@ export class SwitchStyler implements style.Styler {
|
|||||||
SwitchStyler.setBackgroundAndBorderProperty,
|
SwitchStyler.setBackgroundAndBorderProperty,
|
||||||
SwitchStyler.resetBackgroundAndBorderProperty), "Switch");
|
SwitchStyler.resetBackgroundAndBorderProperty), "Switch");
|
||||||
|
|
||||||
style.registerHandler(style.borderTopColorProperty, style.ignorePropertyHandler, "Switch");
|
|
||||||
style.registerHandler(style.borderRightColorProperty, style.ignorePropertyHandler, "Switch");
|
|
||||||
style.registerHandler(style.borderBottomColorProperty, style.ignorePropertyHandler, "Switch");
|
|
||||||
style.registerHandler(style.borderLeftColorProperty, style.ignorePropertyHandler, "Switch");
|
|
||||||
|
|
||||||
style.registerHandler(style.borderTopWidthProperty, style.ignorePropertyHandler, "Switch");
|
|
||||||
style.registerHandler(style.borderRightWidthProperty, style.ignorePropertyHandler, "Switch");
|
|
||||||
style.registerHandler(style.borderBottomWidthProperty, style.ignorePropertyHandler, "Switch");
|
|
||||||
style.registerHandler(style.borderLeftWidthProperty, style.ignorePropertyHandler, "Switch");
|
|
||||||
|
|
||||||
style.registerHandler(style.borderTopLeftRadiusProperty, style.ignorePropertyHandler, "Switch");
|
|
||||||
style.registerHandler(style.borderTopRightRadiusProperty, style.ignorePropertyHandler, "Switch");
|
|
||||||
style.registerHandler(style.borderBottomRightRadiusProperty, style.ignorePropertyHandler, "Switch");
|
|
||||||
style.registerHandler(style.borderBottomLeftRadiusProperty, style.ignorePropertyHandler, "Switch");
|
|
||||||
|
|
||||||
style.registerHandler(style.backgroundInternalProperty, style.ignorePropertyHandler, "Switch");
|
style.registerHandler(style.backgroundInternalProperty, style.ignorePropertyHandler, "Switch");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,6 @@ export class SwitchStyler implements style.Styler {
|
|||||||
SwitchStyler.resetBackgroundColorProperty,
|
SwitchStyler.resetBackgroundColorProperty,
|
||||||
SwitchStyler.getBackgroundColorProperty), "Switch");
|
SwitchStyler.getBackgroundColorProperty), "Switch");
|
||||||
|
|
||||||
// Ignore the default backgroundInternalProperty handler
|
|
||||||
style.registerHandler(style.backgroundInternalProperty, style.ignorePropertyHandler, "Switch");
|
style.registerHandler(style.backgroundInternalProperty, style.ignorePropertyHandler, "Switch");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user