mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 03:01:51 +08:00
Added tintColor property in Image view. It should be used instead of color
This commit is contained in:
2
tns-core-modules/ui/styling/style.d.ts
vendored
2
tns-core-modules/ui/styling/style.d.ts
vendored
@ -41,6 +41,7 @@ declare module "ui/styling/style" {
|
||||
public scaleX: number;
|
||||
public scaleY: number;
|
||||
public color: Color;
|
||||
public tintColor: Color;
|
||||
public placeholderColor: Color;
|
||||
public backgroundColor: Color;
|
||||
public backgroundImage: string;
|
||||
@ -105,6 +106,7 @@ declare module "ui/styling/style" {
|
||||
export var scaleXProperty: styleProperty.Property;
|
||||
export var scaleYProperty: styleProperty.Property;
|
||||
export var colorProperty: styleProperty.Property;
|
||||
export var tintColorProperty: styleProperty.Property;
|
||||
export var placeholderColorProperty: styleProperty.Property;
|
||||
export var backgroundImageProperty: styleProperty.Property;
|
||||
export var backgroundColorProperty: styleProperty.Property;
|
||||
|
@ -583,6 +583,13 @@ export class Style extends DependencyObservable implements styling.Style {
|
||||
this._setValue(colorProperty, value);
|
||||
}
|
||||
|
||||
get tintColor(): Color {
|
||||
return this._getValue(tintColorProperty);
|
||||
}
|
||||
set tintColor(value: Color) {
|
||||
this._setValue(tintColorProperty, value);
|
||||
}
|
||||
|
||||
get placeholderColor(): Color {
|
||||
return this._getValue(placeholderColorProperty);
|
||||
}
|
||||
@ -1061,6 +1068,10 @@ export var colorProperty = new styleProperty.Property("color", "color",
|
||||
new PropertyMetadata(undefined, PropertyMetadataSettings.Inheritable, undefined, Color.isValid, Color.equals),
|
||||
converters.colorConverter);
|
||||
|
||||
export var tintColorProperty = new styleProperty.Property("tintColor", "tint-color",
|
||||
new PropertyMetadata(undefined, PropertyMetadataSettings.Inheritable, undefined, Color.isValid, Color.equals),
|
||||
converters.colorConverter);
|
||||
|
||||
export var placeholderColorProperty = new styleProperty.Property("placeholderColor", "placeholder-color",
|
||||
new PropertyMetadata(undefined, PropertyMetadataSettings.None, undefined, Color.isValid, Color.equals),
|
||||
converters.colorConverter);
|
||||
|
5
tns-core-modules/ui/styling/styling.d.ts
vendored
5
tns-core-modules/ui/styling/styling.d.ts
vendored
@ -43,6 +43,11 @@
|
||||
*/
|
||||
color: color.Color;
|
||||
|
||||
/**
|
||||
* A color used to tint template images.
|
||||
*/
|
||||
tintColor: color.Color;
|
||||
|
||||
/**
|
||||
* Gets or sets the color of the placeholder element.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user