Fix Conflict

This commit is contained in:
DB p 2022-10-19 12:21:17 +09:00
parent 88d84b4aae
commit 21c944e833
3 changed files with 23 additions and 46 deletions

View file

@ -32,9 +32,7 @@
Visibility="{Binding MainWindowVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
WindowStartupLocation="Manual"
WindowStyle="None"
mc:Ignorable="d"
Left="{Binding Left, Mode=TwoWay}"
Top="{Binding Top, Mode=TwoWay}">
mc:Ignorable="d">
<Window.Resources>
<converters:QuerySuggestionBoxConverter x:Key="QuerySuggestionBoxConverter" />
<converters:BorderClipConverter x:Key="BorderClipConverter" />
@ -88,20 +86,20 @@
<KeyBinding Key="Left" Command="{Binding EscCommand}" />
<KeyBinding
Key="OemCloseBrackets"
Modifiers="Control"
Command="{Binding IncreaseWidthCommand}"/>
Command="{Binding IncreaseWidthCommand}"
Modifiers="Control" />
<KeyBinding
Key="OemOpenBrackets"
Modifiers="Control"
Command="{Binding DecreaseWidthCommand}"/>
Command="{Binding DecreaseWidthCommand}"
Modifiers="Control" />
<KeyBinding
Key="OemPlus"
Modifiers="Control"
Command="{Binding IncreaseMaxResultCommand}"/>
Command="{Binding IncreaseMaxResultCommand}"
Modifiers="Control" />
<KeyBinding
Key="OemMinus"
Modifiers="Control"
Command="{Binding DecreaseMaxResultCommand}"/>
Command="{Binding DecreaseMaxResultCommand}"
Modifiers="Control" />
<KeyBinding
Key="H"
Command="{Binding LoadHistoryCommand}"
@ -195,9 +193,9 @@
AllowDrop="True"
Background="Transparent"
PreviewDragOver="OnPreviewDragOver"
PreviewKeyUp="QueryTextBox_KeyUp"
Style="{DynamicResource QueryBoxStyle}"
Text="{Binding QueryText, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
PreviewKeyUp="QueryTextBox_KeyUp"
Visibility="Visible">
<TextBox.CommandBindings>
<CommandBinding Command="ApplicationCommands.Copy" Executed="OnCopy" />

View file

@ -108,7 +108,6 @@ namespace Flow.Launcher
animationSound.Position = TimeSpan.Zero;
animationSound.Play();
}
UpdatePosition();
Activate();
QueryTextBox.Focus();
@ -161,6 +160,7 @@ namespace Flow.Launcher
_viewModel.QueryTextCursorMovedToEnd = false;
}
break;
}
};
_settings.PropertyChanged += (o, e) =>
@ -176,6 +176,12 @@ namespace Flow.Launcher
case nameof(Settings.Hotkey):
UpdateNotifyIconText();
break;
case nameof(Settings.WindowLeft):
Left = _settings.WindowLeft;
break;
case nameof(Settings.WindowTop):
Top = _settings.WindowTop;
break;
}
};
}
@ -311,9 +317,10 @@ namespace Flow.Launcher
}
private void PositionReset()
{
Left = WindowLeft();
Top = WindowTop();
_settings.WindowLeft = WindowLeft();
_settings.WindowTop = WindowTop();
// Left = _settings.WindowLeft;
//Top = _settings.WindowTop;
}
private void InitProgressbarAnimation()
{
@ -469,15 +476,6 @@ namespace Flow.Launcher
_viewModel.Show();
}
}
private void InitializePosition()
{
if (!_settings.RememberLastLaunchLocation)
{
Left = WindowLeft();
Top = WindowTop();
}
}
public double WindowLeft()
{

View file

@ -341,25 +341,6 @@ namespace Flow.Launcher.ViewModel
}
public double Top
{
get => _settings.WindowTop;
set
{
_settings.WindowTop = value;
OnPropertyChanged();
}
}
public double Left
{
get => _settings.WindowLeft;
set
{
_settings.WindowLeft = value;
OnPropertyChanged();
}
}
[RelayCommand]
private void IncreaseWidth()
{
@ -370,7 +351,7 @@ namespace Flow.Launcher.ViewModel
else
{
_settings.WindowSize += 100;
Left -= 50;
_settings.WindowLeft -= 50;
}
OnPropertyChanged();
}
@ -384,7 +365,7 @@ namespace Flow.Launcher.ViewModel
}
else
{
Left += 50;
_settings.WindowLeft += 50;
_settings.WindowSize -= 100;
}
OnPropertyChanged();