fixes for WindowWalker (#1767)

* #1744, #1743, #1742

* disabling commands
This commit is contained in:
Clint Rutkas
2020-03-27 16:25:49 -07:00
committed by GitHub
parent e0340dadf4
commit 3028e70a0f
3 changed files with 19 additions and 12 deletions

View File

@@ -3,7 +3,16 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:local="clr-namespace:WindowWalker"
Title="MainWindow" Width="1000" MinHeight="10" Height="85" ResizeMode="NoResize" Topmost="True" WindowStyle="None" Loaded="Window_Loaded" WindowStartupLocation="CenterScreen" SizeToContent="Height" Visibility="{Binding WindowVisibility, Mode=TwoWay, Converter={StaticResource BoolToVis}}"
Title="MainWindow"
Width="1000"
Height="85"
MinHeight="10"
ResizeMode="NoResize"
Topmost="True"
WindowStyle="None"
Loaded="Window_Loaded"
SizeToContent="Height"
Visibility="{Binding WindowVisibility, Mode=TwoWay, Converter={StaticResource BoolToVis}}"
BorderBrush="{DynamicResource PrimaryHueDarkBrush}"
BorderThickness="2"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"

View File

@@ -51,6 +51,9 @@ namespace WindowWalker
UpdateDisplayedVersionNumber();
Left = (SystemParameters.WorkArea.Width - ActualWidth) / 2.0;
Top = (SystemParameters.WorkArea.Height - ActualHeight) / 2.0;
HideWindow();
}

View File

@@ -17,8 +17,8 @@ namespace WindowWalker.ViewModels
private readonly HotKeyHandler _hotKeyHandler;
private readonly List<string> _hints = new List<string>()
{
"search...",
"you can reinvoke this app using CTRL + WIN",
"search for running processes ...",
// "you can reinvoke this app using CTRL + WIN",
};
private string _searchText = string.Empty;
@@ -168,7 +168,7 @@ namespace WindowWalker.ViewModels
_hotKeyHandler = new HotKeyHandler(mainWindow);
_hotKeyHandler.OnHotKeyPressed += HotKeyPressedHandler;
_hints.AddRange(Commands.GetTips());
// _hints.AddRange(Commands.GetTips());
Hint = _hints[_hintCounter];
WireCommands();
@@ -226,7 +226,8 @@ namespace WindowWalker.ViewModels
{
LivePreview.DeactivateLivePreview();
WindowVisibility = false;
ApplicationUpdates.InstallUpdateSyncWithInfo();
// ApplicationUpdates.InstallUpdateSyncWithInfo();
}
private void WindowShow()
@@ -243,13 +244,7 @@ namespace WindowWalker.ViewModels
public void SwitchToSelectedWindow()
{
if (SearchText.StartsWith(":"))
{
LivePreview.DeactivateLivePreview();
WindowHide();
Commands.ProcessCommand(SearchText);
}
else if (SelectedWindowResult != null)
if (SelectedWindowResult != null)
{
LivePreview.DeactivateLivePreview();
SelectedWindowResult.Result.SwitchToWindow();