mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
handlers fixed
This commit is contained in:
@@ -13,6 +13,14 @@ var btn;
|
||||
|
||||
global.moduleMerge(stylersCommon, exports);
|
||||
|
||||
var ignorePropertyHandler = new stylersCommon.StylePropertyChangedHandler(
|
||||
(view, val) => {
|
||||
// empty
|
||||
},
|
||||
(view, val) => {
|
||||
// empty
|
||||
});
|
||||
|
||||
var _defaultBackgrounds = new Map<string, android.graphics.drawable.Drawable>();
|
||||
|
||||
function onBackgroundOrBorderPropertyChanged(v: view.View) {
|
||||
@@ -600,15 +608,14 @@ export class ProgressStyler implements definition.stylers.Styler {
|
||||
ProgressStyler.setColorProperty,
|
||||
ProgressStyler.resetColorProperty), "Progress");
|
||||
|
||||
var borderHandler = new stylersCommon.StylePropertyChangedHandler(
|
||||
style.registerHandler(style.backgroundColorProperty, new stylersCommon.StylePropertyChangedHandler(
|
||||
ProgressStyler.setBackgroundAndBorderProperty,
|
||||
ProgressStyler.resetBackgroundAndBorderProperty);
|
||||
ProgressStyler.resetBackgroundAndBorderProperty), "Progress");
|
||||
|
||||
style.registerHandler(style.backgroundColorProperty, borderHandler, "Progress");
|
||||
style.registerHandler(style.borderWidthProperty, borderHandler, "Progress");
|
||||
style.registerHandler(style.borderColorProperty, borderHandler, "Progress");
|
||||
style.registerHandler(style.borderRadiusProperty, borderHandler, "Progress");
|
||||
style.registerHandler(style.backgroundInternalProperty, borderHandler, "Progress");
|
||||
style.registerHandler(style.borderWidthProperty, ignorePropertyHandler, "Progress");
|
||||
style.registerHandler(style.borderColorProperty, ignorePropertyHandler, "Progress");
|
||||
style.registerHandler(style.borderRadiusProperty, ignorePropertyHandler, "Progress");
|
||||
style.registerHandler(style.backgroundInternalProperty, ignorePropertyHandler, "Progress");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -638,15 +645,14 @@ export class SliderStyler implements definition.stylers.Styler {
|
||||
SliderStyler.setColorProperty,
|
||||
SliderStyler.resetColorProperty), "Slider");
|
||||
|
||||
var borderHandler = new stylersCommon.StylePropertyChangedHandler(
|
||||
style.registerHandler(style.backgroundColorProperty, new stylersCommon.StylePropertyChangedHandler(
|
||||
SliderStyler.setBackgroundAndBorderProperty,
|
||||
SliderStyler.resetBackgroundAndBorderProperty);
|
||||
SliderStyler.resetBackgroundAndBorderProperty), "Slider");
|
||||
|
||||
style.registerHandler(style.backgroundColorProperty, borderHandler, "Slider");
|
||||
style.registerHandler(style.borderWidthProperty, borderHandler, "Slider");
|
||||
style.registerHandler(style.borderColorProperty, borderHandler, "Slider");
|
||||
style.registerHandler(style.borderRadiusProperty, borderHandler, "Slider");
|
||||
style.registerHandler(style.backgroundInternalProperty, borderHandler, "Slider");
|
||||
style.registerHandler(style.borderWidthProperty, ignorePropertyHandler, "Slider");
|
||||
style.registerHandler(style.borderColorProperty, ignorePropertyHandler, "Slider");
|
||||
style.registerHandler(style.borderRadiusProperty, ignorePropertyHandler, "Slider");
|
||||
style.registerHandler(style.backgroundInternalProperty, ignorePropertyHandler, "Slider");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -684,15 +690,14 @@ export class SwitchStyler implements definition.stylers.Styler {
|
||||
SwitchStyler.setColorProperty,
|
||||
SwitchStyler.resetColorProperty), "Switch");
|
||||
|
||||
var borderHandler = new stylersCommon.StylePropertyChangedHandler(
|
||||
style.registerHandler(style.backgroundColorProperty, new stylersCommon.StylePropertyChangedHandler(
|
||||
SwitchStyler.setBackgroundAndBorderProperty,
|
||||
SwitchStyler.resetBackgroundAndBorderProperty);
|
||||
SwitchStyler.resetBackgroundAndBorderProperty), "Switch");
|
||||
|
||||
style.registerHandler(style.backgroundColorProperty, borderHandler, "Switch");
|
||||
style.registerHandler(style.borderWidthProperty, borderHandler, "Switch");
|
||||
style.registerHandler(style.borderColorProperty, borderHandler, "Switch");
|
||||
style.registerHandler(style.borderRadiusProperty, borderHandler, "Switch");
|
||||
style.registerHandler(style.backgroundInternalProperty, borderHandler, "Switch");
|
||||
style.registerHandler(style.borderWidthProperty, ignorePropertyHandler, "Switch");
|
||||
style.registerHandler(style.borderColorProperty, ignorePropertyHandler, "Switch");
|
||||
style.registerHandler(style.borderRadiusProperty, ignorePropertyHandler, "Switch");
|
||||
style.registerHandler(style.backgroundInternalProperty, ignorePropertyHandler, "Switch");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user