@@ -14,6 +14,11 @@ public static class ProgressHUDAppearance
1414 OperatingSystem . IsIOSVersionAtLeast ( 13 , 0 ) || OperatingSystem . IsMacCatalystVersionAtLeast ( 13 ) ?
1515 UIColor . Label . ColorWithAlpha ( 0.8f ) :
1616 UIColor . FromWhiteAlpha ( 0.0f , 0.8f ) ;
17+
18+ public static UIVisualEffect DefaultBackgroundVisualEffect { get ; } =
19+ OperatingSystem . IsIOSVersionAtLeast ( 26 , 0 ) || OperatingSystem . IsMacCatalystVersionAtLeast ( 26 ) ?
20+ UIGlassEffect . Create ( UIGlassEffectStyle . Regular ) :
21+ UIBlurEffect . FromStyle ( UIBlurEffectStyle . Regular ) ;
1722
1823 public static UIColor DefaultHudToastBackgroundColor { get ; } = UIColor . Clear ;
1924 public static UIFont DefaultHudFont { get ; } = UIFont . BoldSystemFontOfSize ( 16f ) ;
@@ -28,7 +33,19 @@ public static class ProgressHUDAppearance
2833
2934 public const float DefaultRingRadius = 14f ;
3035 public const float DefaultRingThickness = 1f ;
31- public const float DefaultHudCornerRadius = 10f ;
36+ public static float DefaultHudCornerRadius { get ; } =
37+ OperatingSystem . IsIOSVersionAtLeast ( 26 , 0 ) || OperatingSystem . IsMacCatalystVersionAtLeast ( 26 ) ?
38+ 20f : 10f ;
39+
40+ public static float DefaultHudBorderThickness { get ; } =
41+ OperatingSystem . IsIOSVersionAtLeast ( 26 , 0 ) || OperatingSystem . IsMacCatalystVersionAtLeast ( 26 ) ?
42+ 1f : 0f ;
43+
44+ public static UIColor DefaultHudBorderColor { get ; } =
45+ OperatingSystem . IsIOSVersionAtLeast ( 26 , 0 ) || OperatingSystem . IsMacCatalystVersionAtLeast ( 26 ) ?
46+ UIColor . FromWhiteAlpha ( 1.0f , 0.3f ) :
47+ UIColor . Clear ;
48+
3249 public const double DefaultProgressUpdateInterval = 300 ;
3350 public const float DefaultActivityIndicatorScale = 1f ;
3451
@@ -66,11 +83,26 @@ public static class ProgressHUDAppearance
6683 /// Get or set hud corner radius
6784 /// </summary>
6885 public static float HudCornerRadius { get ; set ; } = DefaultHudCornerRadius ;
69-
86+
7087 /// <summary>
71- /// Get or set hud background color
88+ /// Get or set hud background color. This only works if HudBackgroundVisualEffect is null
7289 /// </summary>
7390 public static UIColor HudBackgroundColor { get ; set ; } = DefaultHudBackgroundColor ;
91+
92+ /// <summary>
93+ /// Get or set hud border thickness
94+ /// </summary>
95+ public static float HudBorderThickness { get ; set ; } = DefaultHudBorderThickness ;
96+
97+ /// <summary>
98+ /// Get or set hud border color
99+ /// </summary>
100+ public static UIColor HudBorderColor { get ; set ; } = DefaultHudBorderColor ;
101+
102+ /// <summary>
103+ /// Get or set hud background visual effect
104+ /// </summary>
105+ public static UIVisualEffect ? HudBackgroundVisualEffect { get ; set ; } = DefaultBackgroundVisualEffect ;
74106
75107 /// <summary>
76108 /// Get or set image tint color
@@ -127,6 +159,9 @@ public static void ResetToDefaults()
127159
128160 HudCornerRadius = DefaultHudCornerRadius ;
129161 HudBackgroundColor = DefaultHudBackgroundColor ;
162+ HudBorderThickness = DefaultHudBorderThickness ;
163+ HudBackgroundVisualEffect = DefaultBackgroundVisualEffect ;
164+ HudBorderThickness = DefaultHudBorderThickness ;
130165 HudImageTintColor = DefaultForegroundColor ;
131166 HudToastBackgroundColor = DefaultHudToastBackgroundColor ;
132167 HudFont = DefaultHudFont ;
0 commit comments