Make the number of results show at a time customizable

This commit is contained in:
kerams
2015-07-12 21:13:30 +02:00
parent 207546b53c
commit c79bf1ca3a
5 changed files with 25 additions and 7 deletions

View File

@@ -66,10 +66,21 @@ namespace Wox
UserSettingStorage.Instance.Save();
};
comboMaxResultsToShow.SelectionChanged += (o, e) =>
{
UserSettingStorage.Instance.MaxResultsToShow = (int)comboMaxResultsToShow.SelectedItem;
UserSettingStorage.Instance.Save();
MainWindow.pnlResult.lbResults.GetBindingExpression(MaxHeightProperty).UpdateTarget();
};
cbStartWithWindows.IsChecked = File.Exists(woxLinkPath);
cbHideWhenDeactive.IsChecked = UserSettingStorage.Instance.HideWhenDeactive;
cbDontPromptUpdateMsg.IsChecked = UserSettingStorage.Instance.DontPromptUpdateMsg;
comboMaxResultsToShow.ItemsSource = Enumerable.Range(2, 16);
var maxResults = UserSettingStorage.Instance.MaxResultsToShow;
comboMaxResultsToShow.SelectedItem = maxResults == 0 ? 6 : maxResults;
#endregion
#region Theme