diff --git a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
index 43a68a2a6..10a1e46d1 100644
--- a/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
+++ b/Flow.Launcher.Infrastructure/UserSettings/Settings.cs
@@ -53,6 +53,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings
public string ResultFontStretch { get; set; }
public bool UseGlyphIcons { get; set; } = true;
public bool UseAnimation { get; set; } = true;
+ public int AnimationLength { get; set; } = 360;
public bool UseSound { get; set; } = true;
public bool UseClock { get; set; } = true;
public bool UseDate { get; set; } = false;
diff --git a/Flow.Launcher/Languages/en.xaml b/Flow.Launcher/Languages/en.xaml
index 30c117378..e69d9dcd8 100644
--- a/Flow.Launcher/Languages/en.xaml
+++ b/Flow.Launcher/Languages/en.xaml
@@ -157,6 +157,8 @@
Play a small sound when the search window opens
Animation
Use Animation in UI
+ Animation Length (ms)
+ The length of the UI animation in milliseconds
Clock
Date
diff --git a/Flow.Launcher/MainWindow.xaml.cs b/Flow.Launcher/MainWindow.xaml.cs
index 4adfccff4..e080c55b3 100644
--- a/Flow.Launcher/MainWindow.xaml.cs
+++ b/Flow.Launcher/MainWindow.xaml.cs
@@ -383,7 +383,7 @@ namespace Flow.Launcher
{
From = 0,
To = 1,
- Duration = TimeSpan.FromSeconds(0.25),
+ Duration = TimeSpan.FromMilliseconds(_settings.AnimationLength * 2 / 3),
FillBehavior = FillBehavior.Stop
};
@@ -391,7 +391,7 @@ namespace Flow.Launcher
{
From = Top + 10,
To = Top,
- Duration = TimeSpan.FromSeconds(0.25),
+ Duration = TimeSpan.FromMilliseconds(_settings.AnimationLength * 2 / 3),
FillBehavior = FillBehavior.Stop
};
var IconMotion = new DoubleAnimation
@@ -399,7 +399,7 @@ namespace Flow.Launcher
From = 12,
To = 0,
EasingFunction = easing,
- Duration = TimeSpan.FromSeconds(0.36),
+ Duration = TimeSpan.FromMilliseconds(_settings.AnimationLength),
FillBehavior = FillBehavior.Stop
};
@@ -408,7 +408,7 @@ namespace Flow.Launcher
From = 0,
To = 1,
EasingFunction = easing,
- Duration = TimeSpan.FromSeconds(0.36),
+ Duration = TimeSpan.FromMilliseconds(_settings.AnimationLength),
FillBehavior = FillBehavior.Stop
};
double TargetIconOpacity = SearchIcon.Opacity; // Animation Target Opacity from Style
@@ -417,7 +417,7 @@ namespace Flow.Launcher
From = 0,
To = TargetIconOpacity,
EasingFunction = easing,
- Duration = TimeSpan.FromSeconds(0.36),
+ Duration = TimeSpan.FromMilliseconds(_settings.AnimationLength),
FillBehavior = FillBehavior.Stop
};
@@ -427,7 +427,7 @@ namespace Flow.Launcher
From = new Thickness(0, 12, right, 0),
To = new Thickness(0, 0, right, 0),
EasingFunction = easing,
- Duration = TimeSpan.FromSeconds(0.36),
+ Duration = TimeSpan.FromMilliseconds(_settings.AnimationLength),
FillBehavior = FillBehavior.Stop
};
diff --git a/Flow.Launcher/SettingWindow.xaml b/Flow.Launcher/SettingWindow.xaml
index 665d16b8f..ce0b55de7 100644
--- a/Flow.Launcher/SettingWindow.xaml
+++ b/Flow.Launcher/SettingWindow.xaml
@@ -2414,6 +2414,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Settings.UseAnimation = value;
}
+ public int AnimationLength
+ {
+ get => Settings.AnimationLength;
+ set => Settings.AnimationLength = value;
+ }
+
public bool UseSound
{
get => Settings.UseSound;