Skip to content

Commit 924dd74

Browse files
committed
Fix Defaut Position Logic
1 parent ba1d384 commit 924dd74

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ public string Language
4545

4646
public double SettingWindowWidth { get; set; } = 1000;
4747
public double SettingWindowHeight { get; set; } = 700;
48-
public double SettingWindowTop { get; set; } = 0;
49-
public double SettingWindowLeft { get; set; } = 0;
48+
public double SettingWindowTop { get; set; }
49+
public double SettingWindowLeft { get; set; }
5050

5151
public int CustomExplorerIndex { get; set; } = 0;
5252

Flow.Launcher/SettingWindow.xaml.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -357,15 +357,15 @@ private void ItemSizeChanged(object sender, SizeChangedEventArgs e)
357357

358358
public void InitializePosition()
359359
{
360-
if (settings.SettingWindowTop == 0 && settings.SettingWindowLeft == 0)
360+
if (settings.SettingWindowTop >= 0 && settings.SettingWindowLeft >= 0)
361361
{
362-
Top = WindowTop();
363-
Left = WindowLeft();
362+
Top = settings.SettingWindowTop;
363+
Left = settings.SettingWindowLeft;
364364
}
365365
else
366366
{
367-
Top = settings.SettingWindowTop;
368-
Left = settings.SettingWindowLeft;
367+
Top = WindowTop();
368+
Left = WindowLeft();
369369
}
370370
}
371371
public double WindowLeft()

0 commit comments

Comments
 (0)