mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-24 04:00:02 +01:00
fixes for WindowWalker (#1767)
* #1744, #1743, #1742 * disabling commands
This commit is contained in:
@@ -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}"
|
||||
|
||||
@@ -51,6 +51,9 @@ namespace WindowWalker
|
||||
|
||||
UpdateDisplayedVersionNumber();
|
||||
|
||||
Left = (SystemParameters.WorkArea.Width - ActualWidth) / 2.0;
|
||||
Top = (SystemParameters.WorkArea.Height - ActualHeight) / 2.0;
|
||||
|
||||
HideWindow();
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user