@@ -45,7 +45,6 @@ public partial class MainWindow
45
45
private MainViewModel _viewModel ;
46
46
private bool _animating ;
47
47
private bool isArrowKeyPressed = false ;
48
- private double WindowWidthForSave ;
49
48
50
49
private MediaPlayer animationSoundWMP ;
51
50
private SoundPlayer animationSoundWPF ;
@@ -121,6 +120,8 @@ private void OnResizeEnd()
121
120
_settings . MaxResultsToShow = Convert . ToInt32 ( Math . Truncate ( itemCount ) ) ;
122
121
}
123
122
}
123
+
124
+ _viewModel . MainWindowWidth = Width ;
124
125
FlowMainWindow . SizeToContent = SizeToContent . Height ;
125
126
}
126
127
@@ -154,9 +155,6 @@ private void OnPaste(object sender, DataObjectPastingEventArgs e)
154
155
private async void OnClosing ( object sender , CancelEventArgs e )
155
156
{
156
157
_notifyIcon . Visible = false ;
157
- /* In this timing, window alreayd closed and it effect to window size. So at this point, whenever the window changes,
158
- we recall the width we've stored as a variable and specify it in the settings. This way, the existing window size will be recalled on the next run.*/
159
- _settings . WindowSize = WindowWidthForSave ;
160
158
App . API . SaveAppAllSettings ( ) ;
161
159
e . Cancel = true ;
162
160
await PluginManager . DisposePluginsAsync ( ) ;
@@ -834,10 +832,5 @@ private void QueryTextBox_KeyUp(object sender, KeyEventArgs e)
834
832
be . UpdateSource ( ) ;
835
833
}
836
834
}
837
-
838
- private void Window_SizeChanged ( object sender , SizeChangedEventArgs e )
839
- {
840
- WindowWidthForSave = Width ;
841
- }
842
835
}
843
836
}
0 commit comments