Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions Flow.Launcher.Infrastructure/UserSettings/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ public bool ShowOpenResultHotkey
}
}

public double WindowSize { get; set; } = 580;
public const double DefaultWindowSize = 580;
public double WindowSize { get; set; } = DefaultWindowSize;
Comment thread
pttydou marked this conversation as resolved.
public string PreviewHotkey { get; set; } = $"F1";
public string AutoCompleteHotkey { get; set; } = $"{KeyConstant.Ctrl} + Tab";
public string AutoCompleteHotkey2 { get; set; } = $"";
Expand Down Expand Up @@ -500,7 +501,21 @@ public bool KeepMaxResults
}
}

public int MaxResultsToShow { get; set; } = 5;
public const int DefaultMaxResultsToShow = 5;
public int MaxResultsToShow { get; set; } = DefaultMaxResultsToShow;

public void ResetSearchWindowSize()
{
if (WindowSize == DefaultWindowSize)
OnPropertyChanged(nameof(WindowSize));
else
WindowSize = DefaultWindowSize;

if (MaxResultsToShow == DefaultMaxResultsToShow)
OnPropertyChanged(nameof(MaxResultsToShow));
else
MaxResultsToShow = DefaultMaxResultsToShow;
}

public int ActivateTimes { get; set; }

Comment thread
pttydou marked this conversation as resolved.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ public void Reset()

WindowHeightSize = 42;
ItemHeightSize = 58;
Settings.ResetSearchWindowSize();
}

[RelayCommand]
Expand Down