Skip to content
Merged
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
4 changes: 2 additions & 2 deletions Flow.Launcher.Infrastructure/UserSettings/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public string Theme

public double SettingWindowWidth { get; set; } = 1000;
public double SettingWindowHeight { get; set; } = 700;
public double SettingWindowTop { get; set; }
public double SettingWindowLeft { get; set; }
public double? SettingWindowTop { get; set; } = null;
public double? SettingWindowLeft { get; set; } = null;
public System.Windows.WindowState SettingWindowState { get; set; } = WindowState.Normal;

public int CustomExplorerIndex { get; set; } = 0;
Expand Down
6 changes: 3 additions & 3 deletions Flow.Launcher/SettingWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@ private void Window_StateChanged(object sender, EventArgs e)

public void InitializePosition()
{
if (_settings.SettingWindowTop == null)
if (_settings.SettingWindowTop == null || _settings.SettingWindowLeft == null)
{
Top = WindowTop();
Left = WindowLeft();
}
else
{
Top = _settings.SettingWindowTop;
Left = _settings.SettingWindowLeft;
Top = _settings.SettingWindowTop.Value;
Left = _settings.SettingWindowLeft.Value;
}
WindowState = _settings.SettingWindowState;
}
Expand Down
4 changes: 2 additions & 2 deletions Flow.Launcher/ViewModel/SettingWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ public double SettingWindowHeight
set => Settings.SettingWindowHeight = value;
}

public double SettingWindowTop
public double? SettingWindowTop
{
get => Settings.SettingWindowTop;
set => Settings.SettingWindowTop = value;
}

public double SettingWindowLeft
public double? SettingWindowLeft
{
get => Settings.SettingWindowLeft;
set => Settings.SettingWindowLeft = value;
Expand Down