diff --git a/Project-Aurora/Project-Aurora/Settings/LayerEffectConfig.cs b/Project-Aurora/Project-Aurora/Settings/LayerEffectConfig.cs
index 34b29387e..b85205f31 100644
--- a/Project-Aurora/Project-Aurora/Settings/LayerEffectConfig.cs
+++ b/Project-Aurora/Project-Aurora/Settings/LayerEffectConfig.cs
@@ -23,6 +23,7 @@ public class LayerEffectConfig
public Color secondary;
public float speed;
public float angle;
+ public float gradient_size = 100.0f;
public AnimationType animation_type;
public bool animation_reverse;
public EffectBrush brush;
@@ -35,6 +36,7 @@ public class LayerEffectConfig
[JsonIgnore] public Color Secondary { get => secondary; set => secondary = value; }
[JsonIgnore] public float Speed { get => speed; set => speed = value; }
[JsonIgnore] public float Angle { get => angle; set => angle = value; }
+ [JsonIgnore] public float GradientSize { get => gradient_size; set => gradient_size = value; }
[JsonIgnore] public AnimationType AnimationType { get => animation_type; set => animation_type = value; }
[JsonIgnore] public bool AnimationReverse { get => animation_reverse; set => animation_reverse = value; }
[JsonIgnore] public EffectBrush Brush { get => brush; set => brush = value; }
diff --git a/Project-Aurora/Project-Aurora/Settings/Layers/Control_GradientLayer.xaml b/Project-Aurora/Project-Aurora/Settings/Layers/Control_GradientLayer.xaml
index e5d021b6e..114ca5ac8 100644
--- a/Project-Aurora/Project-Aurora/Settings/Layers/Control_GradientLayer.xaml
+++ b/Project-Aurora/Project-Aurora/Settings/Layers/Control_GradientLayer.xaml
@@ -30,17 +30,21 @@
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/Project-Aurora/Project-Aurora/Settings/Layers/Control_GradientLayer.xaml.cs b/Project-Aurora/Project-Aurora/Settings/Layers/Control_GradientLayer.xaml.cs
index 38fd6e2ba..e058dcf5b 100644
--- a/Project-Aurora/Project-Aurora/Settings/Layers/Control_GradientLayer.xaml.cs
+++ b/Project-Aurora/Project-Aurora/Settings/Layers/Control_GradientLayer.xaml.cs
@@ -40,6 +40,8 @@ public void SetSettings()
{
if(this.DataContext is GradientLayerHandler && !settingsset)
{
+ this.wave_size_slider.Value = (this.DataContext as GradientLayerHandler).Properties.GradientConfig.gradient_size;
+ this.wave_size_label.Text = (this.DataContext as GradientLayerHandler).Properties.GradientConfig.gradient_size + " %";
this.effect_speed_slider.Value = (this.DataContext as GradientLayerHandler).Properties._GradientConfig.speed;
this.effect_speed_label.Text = "x " + (this.DataContext as GradientLayerHandler).Properties._GradientConfig.speed;
this.effect_angle.Text = (this.DataContext as GradientLayerHandler).Properties._GradientConfig.angle.ToString();
@@ -96,7 +98,6 @@ private void Button_SetGradientRainbowLoop_Click(object sender, RoutedEventArgs
Global.logger.Error("Could not set brush, exception: " + exc);
}
}
-
private void effect_speed_slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs e)
{
if (IsLoaded && settingsset && this.DataContext is GradientLayerHandler && sender is Slider)
@@ -108,6 +109,24 @@ private void effect_speed_slider_ValueChanged(object sender, RoutedPropertyChang
}
}
+ private void wave_size_slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs e)
+ {
+ if (IsLoaded && settingsset && this.DataContext is GradientLayerHandler && sender is Slider)
+ {
+ (this.DataContext as GradientLayerHandler).Properties.GradientConfig.gradient_size = (float)(sender as Slider).Value;
+
+ if (this.wave_size_label is TextBlock)
+
+ {
+ this.wave_size_label.Text = (sender as Slider).Value + " %";
+ if ((sender as Slider).Value == 0)
+ {
+ this.wave_size_label.Text = "Stop";
+ }
+ }
+ }
+ }
+
private void effect_angle_ValueChanged(object sender, RoutedPropertyChangedEventArgs