diff --git a/SukiUI/ColorTheme/NotificationColor.cs b/SukiUI/ColorTheme/NotificationColor.cs index 4c9b9161..af4355dc 100644 --- a/SukiUI/ColorTheme/NotificationColor.cs +++ b/SukiUI/ColorTheme/NotificationColor.cs @@ -4,8 +4,8 @@ namespace SukiUI.ColorTheme; public static class NotificationColor { - public static readonly SolidColorBrush InfoIconForeground = new(Color.FromRgb(47, 84, 235)); - public static readonly SolidColorBrush SuccessIconForeground = new(Color.FromRgb(56, 158, 13)); - public static readonly SolidColorBrush WarningIconForeground = new(Color.FromRgb(240, 140, 22)); - public static readonly SolidColorBrush ErrorIconForeground = new(Color.FromRgb(236, 63, 48)); + public static readonly SolidColorBrush InfoIconForeground = new(Color.FromRgb(47,84,235)); + public static readonly SolidColorBrush SuccessIconForeground = new(Color.FromRgb(56,158,13)); + public static readonly SolidColorBrush WarningIconForeground = new(Color.FromRgb(240,140,22)); + public static readonly SolidColorBrush ErrorIconForeground = new(Color.FromRgb(236,63,48)); } \ No newline at end of file diff --git a/SukiUI/Content/Icons.cs b/SukiUI/Content/Icons.cs index 5e3f8a62..c6cd6889 100644 --- a/SukiUI/Content/Icons.cs +++ b/SukiUI/Content/Icons.cs @@ -8,9 +8,12 @@ namespace SukiUI.Content; /// public static class Icons { - // Material Icons - public static readonly StreamGeometry WindowMinimize = Parse("M20,14H4V10H20"); + public static readonly StreamGeometry Search = Parse("M11.5,2.75 C16.3324916,2.75 20.25,6.66750844 20.25,11.5 C20.25,13.6461673 19.4773285,15.6118676 18.1949905,17.1340957 L25.0303301,23.9696699 C25.3232233,24.2625631 25.3232233,24.7374369 25.0303301,25.0303301 C24.7640635,25.2965966 24.3473998,25.3208027 24.0537883,25.1029482 L23.9696699,25.0303301 L17.1340957,18.1949905 C15.6118676,19.4773285 13.6461673,20.25 11.5,20.25 C6.66750844,20.25 2.75,16.3324916 2.75,11.5 C2.75,6.66750844 6.66750844,2.75 11.5,2.75 Z M11.5,4.25 C7.49593556,4.25 4.25,7.49593556 4.25,11.5 C4.25,15.5040644 7.49593556,18.75 11.5,18.75 C15.5040644,18.75 18.75,15.5040644 18.75,11.5 C18.75,7.49593556 15.5040644,4.25 11.5,4.25 Z"); + + // Material Icons + public static readonly StreamGeometry WindowMinimize = Parse("M20,14H4V10H20"); + // Material Icons public static readonly StreamGeometry FileOpen = Parse("M17.0606622,9 C17.8933043,9 18.7000032,9.27703406 19.3552116,9.78392956 L19.5300545,9.92783739 L22.116207,12.1907209 C22.306094,12.356872 22.5408581,12.4608817 22.7890575,12.4909364 L22.9393378,12.5 L40.25,12.5 C42.2542592,12.5 43.8912737,14.0723611 43.994802,16.0508414 L44,16.25 L44,35.25 C44,37.2542592 42.4276389,38.8912737 40.4491586,38.994802 L40.25,39 L7.75,39 C5.74574083,39 4.10872626,37.4276389 4.00519801,35.4491586 L4,35.25 L4,12.75 C4,10.7457408 5.57236105,9.10872626 7.55084143,9.00519801 L7.75,9 L17.0606622,9 Z M22.8474156,14.9988741 L20.7205012,17.6147223 C20.0558881,18.4327077 19.0802671,18.9305178 18.0350306,18.993257 L17.8100737,19 L6.5,18.999 L6.5,35.25 C6.5,35.8972087 6.99187466,36.4295339 7.62219476,36.4935464 L7.75,36.5 L40.25,36.5 C40.8972087,36.5 41.4295339,36.0081253 41.4935464,35.3778052 L41.5,35.25 L41.5,16.25 C41.5,15.6027913 41.0081253,15.0704661 40.3778052,15.0064536 L40.25,15 L22.8474156,14.9988741 Z M17.0606622,11.5 L7.75,11.5 C7.10279131,11.5 6.5704661,11.9918747 6.50645361,12.6221948 L6.5,12.75 L6.5,16.499 L17.8100737,16.5 C18.1394331,16.5 18.4534488,16.3701335 18.6858203,16.1419575 L18.7802162,16.0382408 L20.415,14.025 L17.883793,11.8092791 C17.693906,11.643128 17.4591419,11.5391183 17.2109425,11.5090636 L17.0606622,11.5 Z"); diff --git a/SukiUI/Controls/BusyArea.axaml b/SukiUI/Controls/BusyArea.axaml index c94bb4a7..98aec979 100644 --- a/SukiUI/Controls/BusyArea.axaml +++ b/SukiUI/Controls/BusyArea.axaml @@ -19,7 +19,7 @@ LastChildFill="True"> diff --git a/SukiUI/Controls/CircleProgressBar.axaml.cs b/SukiUI/Controls/CircleProgressBar.axaml.cs index 35169da5..8b50b410 100644 --- a/SukiUI/Controls/CircleProgressBar.axaml.cs +++ b/SukiUI/Controls/CircleProgressBar.axaml.cs @@ -1,5 +1,6 @@ using Avalonia; using Avalonia.Controls; +using Avalonia.Data; using Avalonia.Markup.Xaml; namespace SukiUI.Controls @@ -24,7 +25,7 @@ public double Value set { _value = (int)(value * 3.6); - SetValue(ValueProperty, _value); + SetValue(ValueProperty,_value); } } @@ -32,9 +33,9 @@ public double Value /// Defines the property. /// public static readonly StyledProperty ValueProperty = - AvaloniaProperty.Register(nameof(Value), defaultValue: 50, coerce: (o, d) => d * 3.6); - - + AvaloniaProperty.Register(nameof(Value), defaultValue: 50, coerce: (o, d) => d * 3.6); + + public static readonly StyledProperty HeightProperty = AvaloniaProperty.Register(nameof(Height), defaultValue: 150); @@ -61,7 +62,7 @@ public int StrokeWidth get { return GetValue(StrokeWidthProperty); } set { SetValue(StrokeWidthProperty, value); } } - + public static readonly StyledProperty IsIndeterminateProperty = AvaloniaProperty.Register(nameof(IsIndeterminate), false); diff --git a/SukiUI/Controls/CodeView.axaml.cs b/SukiUI/Controls/CodeView.axaml.cs index 23c6ee5c..d9386916 100644 --- a/SukiUI/Controls/CodeView.axaml.cs +++ b/SukiUI/Controls/CodeView.axaml.cs @@ -9,6 +9,7 @@ using SukiUI.Content; using SukiUI.Extensions; using System; +using System.Threading; using System.Threading.Tasks; namespace SukiUI.Controls; diff --git a/SukiUI/Controls/ContentExpandControl.axaml.cs b/SukiUI/Controls/ContentExpandControl.axaml.cs index 8a01f045..064c75e4 100644 --- a/SukiUI/Controls/ContentExpandControl.axaml.cs +++ b/SukiUI/Controls/ContentExpandControl.axaml.cs @@ -1,7 +1,7 @@ +using System; using Avalonia; using Avalonia.Controls; using Avalonia.Layout; -using System; namespace SukiUI.Controls { @@ -15,16 +15,16 @@ public double Multiplier get => GetValue(MultiplierProperty); set => SetValue(MultiplierProperty, value); } - + public static readonly StyledProperty OrientationProperty = AvaloniaProperty.Register(nameof(Orientation)); - + public Orientation Orientation { get => GetValue(OrientationProperty); set => SetValue(OrientationProperty, value); } - + static ContentExpandControl() { AffectsArrange(MultiplierProperty, OrientationProperty); diff --git a/SukiUI/Controls/GlassMorphism/GlassCard.axaml.cs b/SukiUI/Controls/GlassMorphism/GlassCard.axaml.cs index 4d055053..ac324bae 100644 --- a/SukiUI/Controls/GlassMorphism/GlassCard.axaml.cs +++ b/SukiUI/Controls/GlassMorphism/GlassCard.axaml.cs @@ -1,11 +1,16 @@ -using Avalonia; +using System; +using System.ComponentModel; +using System.Windows.Input; +using Avalonia; using Avalonia.Controls; +using Avalonia.Controls.Presenters; using Avalonia.Controls.Primitives; using Avalonia.Input; +using Avalonia.Interactivity; +using Avalonia.LogicalTree; using Avalonia.Rendering.Composition; +using Avalonia.Rendering.Composition.Animations; using SukiUI.Helpers; -using System.ComponentModel; -using System.Windows.Input; namespace SukiUI.Controls; @@ -28,8 +33,8 @@ public class GlassCard : ContentControl get => GetValue(BorderThicknessProperty); set => SetValue(BorderThicknessProperty, value); } - - + + public static readonly StyledProperty IsAnimatedProperty = AvaloniaProperty.Register(nameof(IsAnimated), true); @@ -38,7 +43,7 @@ public bool IsAnimated get => GetValue(IsAnimatedProperty); set => SetValue(IsAnimatedProperty, value); } - + public static readonly StyledProperty IsOpaqueProperty = AvaloniaProperty.Register(nameof(IsOpaque), false); @@ -109,7 +114,7 @@ protected override void OnApplyTemplate(TemplateAppliedEventArgs e) } } - + @@ -122,7 +127,7 @@ protected override void OnPointerPressed(PointerPressedEventArgs e) { base.OnPointerPressed(e); PseudoClasses.Set(":pointerdown", true); - if (IsInteractive && Command is not null && Command.CanExecute(CommandParameter)) + if(IsInteractive && Command is not null && Command.CanExecute(CommandParameter)) Command.Execute(CommandParameter); } diff --git a/SukiUI/Controls/InfoBadge.axaml b/SukiUI/Controls/InfoBadge.axaml index 407bb416..ecddd1fe 100644 --- a/SukiUI/Controls/InfoBadge.axaml +++ b/SukiUI/Controls/InfoBadge.axaml @@ -8,10 +8,10 @@ Height="400" Margin="0,20,0,0" Spacing="20"> - - + Header="Info"> +