optimized and add diagnostic feature
This commit is contained in:
		@@ -244,4 +244,23 @@ namespace Billing.UI
 | 
			
		||||
            throw new NotImplementedException();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public class TintColorConverter : IValueConverter
 | 
			
		||||
    {
 | 
			
		||||
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 | 
			
		||||
        {
 | 
			
		||||
            if (value is long l)
 | 
			
		||||
            {
 | 
			
		||||
                return l.IsTransparent() ?
 | 
			
		||||
                    BaseTheme.CurrentPrimaryColor :
 | 
			
		||||
                    l.ToColor();
 | 
			
		||||
            }
 | 
			
		||||
            return Color.Transparent;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
 | 
			
		||||
        {
 | 
			
		||||
            throw new NotImplementedException();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -9,6 +9,7 @@ namespace Billing.UI
 | 
			
		||||
    {
 | 
			
		||||
        public const string PrimaryColorKey = "PrimaryColor";
 | 
			
		||||
        public const string DefaultIcon = "ic_default";
 | 
			
		||||
        public const long TransparentColor = 0x00ffffffL;
 | 
			
		||||
 | 
			
		||||
        public static partial (string main, long build) GetVersion();
 | 
			
		||||
        public static partial string GetRegularFontFamily();
 | 
			
		||||
 
 | 
			
		||||
@@ -237,6 +237,13 @@ namespace Billing.UI
 | 
			
		||||
                .Binding(Image.SourceProperty, nameof(ImageSource))
 | 
			
		||||
                .Binding(TintHelper.TintColorProperty, nameof(TintColor)),
 | 
			
		||||
 | 
			
		||||
                new Label
 | 
			
		||||
                {
 | 
			
		||||
                    VerticalOptions = LayoutOptions.Center
 | 
			
		||||
                }
 | 
			
		||||
                .Binding(Label.TextProperty, nameof(Detail))
 | 
			
		||||
                .DynamicResource(Label.TextColorProperty, BaseTheme.SecondaryTextColor),
 | 
			
		||||
 | 
			
		||||
                new TintImage
 | 
			
		||||
                {
 | 
			
		||||
                    HeightRequest = 20,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user