Skip to content

Commit a68b180

Browse files
authored
Merge pull request #2677 from onesounds/240430WindowPosition
Fix SettingWindow's LeftTop Position when first launch
2 parents 177f8fe + e7abdce commit a68b180

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Flow.Launcher/SettingWindow.xaml.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -446,15 +446,15 @@ private void PluginStore_OnKeyDown(object sender, KeyEventArgs e)
446446

447447
public void InitializePosition()
448448
{
449-
if (settings.SettingWindowTop >= 0 && settings.SettingWindowLeft >= 0)
449+
if (settings.SettingWindowTop == null)
450450
{
451-
Top = settings.SettingWindowTop;
452-
Left = settings.SettingWindowLeft;
451+
Top = WindowTop();
452+
Left = WindowLeft();
453453
}
454454
else
455455
{
456-
Top = WindowTop();
457-
Left = WindowLeft();
456+
Top = settings.SettingWindowTop;
457+
Left = settings.SettingWindowLeft;
458458
}
459459
WindowState = settings.SettingWindowState;
460460
}

0 commit comments

Comments
 (0)