style<Histories>: change searchbar anim time to 0.1 second to avoid flicking

This commit is contained in:
leo 2021-08-12 20:08:49 +08:00
parent 5791ca8fcb
commit aed3c10aa4

View file

@ -167,13 +167,13 @@ namespace SourceGit.Views.Widgets {
ThicknessAnimation anim = new ThicknessAnimation();
anim.From = new Thickness(0);
anim.To = new Thickness(0, -32, 0, 0);
anim.Duration = TimeSpan.FromSeconds(.3);
anim.Duration = TimeSpan.FromSeconds(.1);
searchBar.BeginAnimation(MarginProperty, anim);
} else {
ThicknessAnimation anim = new ThicknessAnimation();
anim.From = new Thickness(0, -32, 0, 0);
anim.To = new Thickness(0);
anim.Duration = TimeSpan.FromSeconds(.3);
anim.Duration = TimeSpan.FromSeconds(.1);
searchBar.BeginAnimation(MarginProperty, anim);
txtSearch.Focus();
@ -195,7 +195,7 @@ namespace SourceGit.Views.Widgets {
ThicknessAnimation anim = new ThicknessAnimation();
anim.From = new Thickness(0);
anim.To = new Thickness(0, -32, 0, 0);
anim.Duration = TimeSpan.FromSeconds(.3);
anim.Duration = TimeSpan.FromSeconds(.1);
searchBar.BeginAnimation(MarginProperty, anim);
}