mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
[Run] UI improvements + ability to show/hide plugins overview panel (#30258)
* Add setting to show/hide plugin keywords in Run * Increasing fontsize and spacing * Removing tooltip prefixes * Tweaks and making sure the window gets smaller when plugins overview is disabled * Label updates for Settings * Updating UI * Fix number of results height * Centering textbox * Adding tooltip to keyword * Selection highlight + dark theme tweaks * Change order and fix CI * Update expect.txt * Add option to select only non-global plugins preview * Fix typos --------- Co-authored-by: Stefan Markovic <stefan@janeasystems.com>
This commit is contained in:
1
.github/actions/spell-check/expect.txt
vendored
1
.github/actions/spell-check/expect.txt
vendored
@@ -1217,6 +1217,7 @@ QITAB
|
|||||||
QITABENT
|
QITABENT
|
||||||
qoi
|
qoi
|
||||||
qps
|
qps
|
||||||
|
Quarternary
|
||||||
QUERYENDSESSION
|
QUERYENDSESSION
|
||||||
QUERYOPEN
|
QUERYOPEN
|
||||||
QUEUESYNC
|
QUEUESYNC
|
||||||
|
|||||||
@@ -118,8 +118,8 @@ namespace Microsoft.Plugin.Program.Programs
|
|||||||
result.TitleHighlightData = StringMatcher.FuzzySearch(query, Name).MatchData;
|
result.TitleHighlightData = StringMatcher.FuzzySearch(query, Name).MatchData;
|
||||||
|
|
||||||
// Using CurrentCulture since this is user facing
|
// Using CurrentCulture since this is user facing
|
||||||
var toolTipTitle = string.Format(CultureInfo.CurrentCulture, "{0}: {1}", Properties.Resources.powertoys_run_plugin_program_file_name, result.Title);
|
var toolTipTitle = result.Title;
|
||||||
var toolTipText = string.Format(CultureInfo.CurrentCulture, "{0}: {1}", Properties.Resources.powertoys_run_plugin_program_file_path, LocationLocalized);
|
var toolTipText = LocationLocalized;
|
||||||
result.ToolTipData = new ToolTipData(toolTipTitle, toolTipText);
|
result.ToolTipData = new ToolTipData(toolTipTitle, toolTipText);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -261,9 +261,9 @@ namespace Microsoft.Plugin.Program.Programs
|
|||||||
result.TitleHighlightData = StringMatcher.FuzzySearch(query, result.Title).MatchData;
|
result.TitleHighlightData = StringMatcher.FuzzySearch(query, result.Title).MatchData;
|
||||||
|
|
||||||
// Using CurrentCulture since this is user facing
|
// Using CurrentCulture since this is user facing
|
||||||
var toolTipTitle = string.Format(CultureInfo.CurrentCulture, "{0}: {1}", Properties.Resources.powertoys_run_plugin_program_file_name, result.Title);
|
var toolTipTitle = result.Title;
|
||||||
string filePath = !string.IsNullOrEmpty(FullPathLocalized) ? FullPathLocalized : FullPath;
|
string filePath = !string.IsNullOrEmpty(FullPathLocalized) ? FullPathLocalized : FullPath;
|
||||||
var toolTipText = string.Format(CultureInfo.CurrentCulture, "{0}: {1}", Properties.Resources.powertoys_run_plugin_program_file_path, filePath);
|
var toolTipText = filePath;
|
||||||
result.ToolTipData = new ToolTipData(toolTipTitle, toolTipText);
|
result.ToolTipData = new ToolTipData(toolTipTitle, toolTipText);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -84,10 +84,10 @@
|
|||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<Grid
|
<Grid
|
||||||
MinHeight="32"
|
MinHeight="32"
|
||||||
Margin="12"
|
Margin="8,12,8,12"
|
||||||
VerticalAlignment="Top">
|
VerticalAlignment="Top">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="32" />
|
<ColumnDefinition Width="38" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
Foreground="{DynamicResource TextPlaceholderColorBrush}" />
|
Foreground="{DynamicResource TextPlaceholderColorBrush}" />
|
||||||
<ui:SymbolIcon
|
<ui:SymbolIcon
|
||||||
AutomationProperties.Name="{x:Static p:Resources.SearchIcon}"
|
AutomationProperties.Name="{x:Static p:Resources.SearchIcon}"
|
||||||
FontSize="18"
|
FontSize="20"
|
||||||
Foreground="{DynamicResource TextPlaceholderColorBrush}"
|
Foreground="{DynamicResource TextPlaceholderColorBrush}"
|
||||||
Symbol="Search12" />
|
Symbol="Search12" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -36,44 +36,42 @@
|
|||||||
<SolidColorBrush Opacity="0.8" Color="{DynamicResource ApplicationBackgroundColor}" />
|
<SolidColorBrush Opacity="0.8" Color="{DynamicResource ApplicationBackgroundColor}" />
|
||||||
</Grid.Background>
|
</Grid.Background>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" MaxHeight="{Binding Results.MaxHeight}" />
|
<RowDefinition Height="*" MaxHeight="{Binding Results.MaxHeight}" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Border
|
<Border
|
||||||
x:Name="SearchBoxBorder"
|
x:Name="SearchBoxBorder"
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Margin="12,12,12,0"
|
Padding="12,4,12,3">
|
||||||
Background="{DynamicResource LayerFillColorDefaultBrush}"
|
|
||||||
BorderBrush="{DynamicResource SurfaceStrokeColorDefaultBrush}"
|
|
||||||
BorderThickness="1"
|
|
||||||
CornerRadius="8">
|
|
||||||
<local:LauncherControl x:Name="SearchBox" />
|
<local:LauncherControl x:Name="SearchBox" />
|
||||||
</Border>
|
</Border>
|
||||||
<local:ResultList
|
|
||||||
x:Name="ListBox"
|
|
||||||
Grid.Row="1"
|
|
||||||
VerticalAlignment="Stretch"
|
|
||||||
PreviewMouseDown="ListBox_PreviewMouseDown"
|
|
||||||
Visibility="{Binding Results.Visibility}" />
|
|
||||||
|
|
||||||
<!-- Have to use a Grid instead of a StackPanel for scrolling to work? -->
|
<!-- Have to use a Grid instead of a StackPanel for scrolling to work? -->
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="KeywordsOverviewGrid"
|
x:Name="KeywordsOverviewGrid"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Margin="12,0,0,0"
|
MaxHeight="256"
|
||||||
Visibility="{Binding PluginsOverviewVisibility}">
|
Visibility="{Binding PluginsOverviewVisibility}">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
<Rectangle
|
||||||
|
Height="1"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
Fill="{DynamicResource DividerStrokeColorDefaultBrush}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="10,16,0,8"
|
Margin="22,12,0,4"
|
||||||
FontWeight="SemiBold"
|
FontWeight="SemiBold"
|
||||||
|
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
||||||
Style="{StaticResource CaptionTextBlockStyle}"
|
Style="{StaticResource CaptionTextBlockStyle}"
|
||||||
Text="{x:Static p:Resources.PluginKeywords}" />
|
Text="{x:Static p:Resources.PluginKeywords}" />
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
|
x:Name="pluginsHintsList"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
|
Margin="16,0,0,0"
|
||||||
ItemContainerStyle="{StaticResource PluginsListViewItemStyle}"
|
ItemContainerStyle="{StaticResource PluginsListViewItemStyle}"
|
||||||
ItemsSource="{Binding Plugins}"
|
ItemsSource="{Binding Plugins}"
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||||
@@ -81,7 +79,7 @@
|
|||||||
SelectionMode="Single">
|
SelectionMode="Single">
|
||||||
<ListView.ItemTemplate>
|
<ListView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid Height="36">
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="*" />
|
<ColumnDefinition Width="*" />
|
||||||
@@ -89,29 +87,44 @@
|
|||||||
<Border
|
<Border
|
||||||
Width="32"
|
Width="32"
|
||||||
Height="32"
|
Height="32"
|
||||||
Margin="4,0,10,0"
|
Padding="2,0,2,0"
|
||||||
Background="{DynamicResource ControlFillColorDefaultBrush}"
|
Background="{DynamicResource ControlFillColorDefaultBrush}"
|
||||||
BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
|
BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
|
||||||
BorderThickness="1"
|
BorderThickness="1"
|
||||||
CornerRadius="4">
|
CornerRadius="4"
|
||||||
|
ToolTipService.ToolTip="{Binding Metadata.ActionKeyword}">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontWeight="SemiBold"
|
FontWeight="SemiBold"
|
||||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||||
Text="{Binding Metadata.ActionKeyword}" />
|
Text="{Binding Metadata.ActionKeyword}"
|
||||||
|
TextAlignment="Left"
|
||||||
|
TextTrimming="WordEllipsis" />
|
||||||
</Border>
|
</Border>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
|
Margin="12,0,0,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
||||||
Text="{Binding Plugin.Description}"
|
Text="{Binding Plugin.Description}"
|
||||||
TextTrimming="CharacterEllipsis" />
|
TextTrimming="CharacterEllipsis"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListView.ItemTemplate>
|
</ListView.ItemTemplate>
|
||||||
</ListView>
|
</ListView>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
<local:ResultList
|
||||||
|
x:Name="ListBox"
|
||||||
|
Grid.Row="2"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
|
BorderBrush="{DynamicResource DividerStrokeColorDefaultBrush}"
|
||||||
|
BorderThickness="0,1,0,0"
|
||||||
|
PreviewMouseDown="ListBox_PreviewMouseDown"
|
||||||
|
Visibility="{Binding Results.Visibility}" />
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<ui:FluentWindow.InputBindings>
|
<ui:FluentWindow.InputBindings>
|
||||||
<KeyBinding Key="Escape" Command="{Binding EscCommand}" />
|
<KeyBinding Key="Escape" Command="{Binding EscCommand}" />
|
||||||
|
|||||||
@@ -220,6 +220,7 @@ namespace PowerLauncher
|
|||||||
_viewModel.PropertyChanged += ViewModel_PropertyChanged;
|
_viewModel.PropertyChanged += ViewModel_PropertyChanged;
|
||||||
_viewModel.MainWindowVisibility = Visibility.Collapsed;
|
_viewModel.MainWindowVisibility = Visibility.Collapsed;
|
||||||
_viewModel.LoadedAtLeastOnce = true;
|
_viewModel.LoadedAtLeastOnce = true;
|
||||||
|
_viewModel.SetPluginsOverviewVisibility();
|
||||||
|
|
||||||
BringProcessToForeground();
|
BringProcessToForeground();
|
||||||
}
|
}
|
||||||
@@ -362,6 +363,8 @@ namespace PowerLauncher
|
|||||||
UpdatePosition();
|
UpdatePosition();
|
||||||
BringProcessToForeground();
|
BringProcessToForeground();
|
||||||
|
|
||||||
|
_viewModel.SetPluginsOverviewVisibility();
|
||||||
|
|
||||||
// HACK: Setting focus here again fixes some focus issues, like on first run or after showing a message box.
|
// HACK: Setting focus here again fixes some focus issues, like on first run or after showing a message box.
|
||||||
SearchBox.QueryTextBox.Focus();
|
SearchBox.QueryTextBox.Focus();
|
||||||
Keyboard.Focus(SearchBox.QueryTextBox);
|
Keyboard.Focus(SearchBox.QueryTextBox);
|
||||||
|
|||||||
@@ -17,23 +17,7 @@
|
|||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
<converters:HighlightTextConverter x:Key="highlightTextConverter" />
|
<converters:HighlightTextConverter x:Key="highlightTextConverter" />
|
||||||
|
|
||||||
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
||||||
<Style x:Key="FocusVisual">
|
|
||||||
<Setter Property="Control.Template">
|
|
||||||
<Setter.Value>
|
|
||||||
<ControlTemplate>
|
|
||||||
<Rectangle
|
|
||||||
Margin="2"
|
|
||||||
SnapsToDevicePixels="true"
|
|
||||||
Stroke="{DynamicResource FocusStrokeColorOuterBrush}"
|
|
||||||
StrokeDashArray="1 2"
|
|
||||||
StrokeThickness="1" />
|
|
||||||
</ControlTemplate>
|
|
||||||
</Setter.Value>
|
|
||||||
</Setter>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style
|
<Style
|
||||||
x:Key="CollapsableTextblock"
|
x:Key="CollapsableTextblock"
|
||||||
BasedOn="{StaticResource CaptionTextBlockStyle}"
|
BasedOn="{StaticResource CaptionTextBlockStyle}"
|
||||||
@@ -48,7 +32,6 @@
|
|||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<ListView
|
<ListView
|
||||||
x:Name="SuggestionsList"
|
x:Name="SuggestionsList"
|
||||||
Margin="0,12,0,0"
|
|
||||||
x:FieldModifier="public"
|
x:FieldModifier="public"
|
||||||
AutomationProperties.Name="{x:Static p:Resources.Results}"
|
AutomationProperties.Name="{x:Static p:Resources.Results}"
|
||||||
ItemsSource="{Binding Results.Results, Mode=OneWay}"
|
ItemsSource="{Binding Results.Results, Mode=OneWay}"
|
||||||
@@ -57,10 +40,13 @@
|
|||||||
SelectedIndex="{Binding Results.SelectedIndex, Mode=TwoWay}"
|
SelectedIndex="{Binding Results.SelectedIndex, Mode=TwoWay}"
|
||||||
SelectionChanged="SuggestionsListView_SelectionChanged"
|
SelectionChanged="SuggestionsListView_SelectionChanged"
|
||||||
SelectionMode="Single">
|
SelectionMode="Single">
|
||||||
|
<ListView.Resources>
|
||||||
|
<Style BasedOn="{StaticResource ResultsListViewItemStyle}" TargetType="{x:Type ListViewItem}" />
|
||||||
|
</ListView.Resources>
|
||||||
<ListView.ItemsPanel>
|
<ListView.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<VirtualizingStackPanel
|
<VirtualizingStackPanel
|
||||||
Margin="12,6,0,0"
|
Margin="12,12,0,0"
|
||||||
IsVirtualizing="{TemplateBinding VirtualizingPanel.IsVirtualizing}"
|
IsVirtualizing="{TemplateBinding VirtualizingPanel.IsVirtualizing}"
|
||||||
VirtualizationMode="{TemplateBinding VirtualizingPanel.VirtualizationMode}" />
|
VirtualizationMode="{TemplateBinding VirtualizingPanel.VirtualizationMode}" />
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
@@ -73,7 +59,7 @@
|
|||||||
<ListView.ItemTemplate>
|
<ListView.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid
|
<Grid
|
||||||
Height="40"
|
Height="44"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
ToolTipService.BetweenShowDelay="0"
|
ToolTipService.BetweenShowDelay="0"
|
||||||
ToolTipService.InitialShowDelay="1000">
|
ToolTipService.InitialShowDelay="1000">
|
||||||
@@ -95,10 +81,13 @@
|
|||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ToolTip>
|
<Grid.ToolTip>
|
||||||
<ToolTip Opened="ToolTip_Opened" Visibility="{Binding Result.ToolTipVisibility}">
|
<ToolTip
|
||||||
|
MaxWidth="480"
|
||||||
|
Opened="ToolTip_Opened"
|
||||||
|
Visibility="{Binding Result.ToolTipVisibility}">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
FontWeight="Bold"
|
FontWeight="SemiBold"
|
||||||
Style="{DynamicResource CollapsableTextblock}"
|
Style="{DynamicResource CollapsableTextblock}"
|
||||||
Text="{Binding Result.ToolTipData.Title}"
|
Text="{Binding Result.ToolTipData.Title}"
|
||||||
TextWrapping="Wrap" />
|
TextWrapping="Wrap" />
|
||||||
@@ -115,9 +104,9 @@
|
|||||||
x:Name="AppIcon"
|
x:Name="AppIcon"
|
||||||
Grid.RowSpan="2"
|
Grid.RowSpan="2"
|
||||||
Height="24"
|
Height="24"
|
||||||
MaxWidth="56"
|
|
||||||
Margin="-6,-2,0,0"
|
Margin="-6,-2,0,0"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
AutomationProperties.Name="{x:Static p:Resources.AppIcon}"
|
AutomationProperties.Name="{x:Static p:Resources.AppIcon}"
|
||||||
Source="{Binding Image}" />
|
Source="{Binding Image}" />
|
||||||
<TextBlock
|
<TextBlock
|
||||||
@@ -125,7 +114,7 @@
|
|||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
VerticalAlignment="Bottom"
|
VerticalAlignment="Bottom"
|
||||||
AutomationProperties.Name="{x:Static p:Resources.Title}"
|
AutomationProperties.Name="{x:Static p:Resources.Title}"
|
||||||
FontSize="14"
|
FontSize="16"
|
||||||
IsHitTestVisible="False"
|
IsHitTestVisible="False"
|
||||||
TextTrimming="CharacterEllipsis">
|
TextTrimming="CharacterEllipsis">
|
||||||
<viewmodel:ResultsViewModel.FormattedText>
|
<viewmodel:ResultsViewModel.FormattedText>
|
||||||
@@ -140,10 +129,9 @@
|
|||||||
x:Name="Path"
|
x:Name="Path"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="0,0,0,0"
|
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
AutomationProperties.Name="{x:Static p:Resources.Subtitle}"
|
AutomationProperties.Name="{x:Static p:Resources.Subtitle}"
|
||||||
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
Opacity="0.6"
|
||||||
Style="{StaticResource CaptionTextBlockStyle}"
|
Style="{StaticResource CaptionTextBlockStyle}"
|
||||||
Text="{Binding Result.SubTitle}"
|
Text="{Binding Result.SubTitle}"
|
||||||
TextTrimming="CharacterEllipsis" />
|
TextTrimming="CharacterEllipsis" />
|
||||||
@@ -187,7 +175,9 @@
|
|||||||
<TextBlock
|
<TextBlock
|
||||||
AutomationProperties.Name="{x:Static p:Resources.ContextMenuItemAdditionalInformation}"
|
AutomationProperties.Name="{x:Static p:Resources.ContextMenuItemAdditionalInformation}"
|
||||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||||
Text="{Binding Title}" />
|
Style="{StaticResource CaptionTextBlockStyle}"
|
||||||
|
Text="{Binding Title}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
</ToolTip>
|
</ToolTip>
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
<Button.Content>
|
<Button.Content>
|
||||||
|
|||||||
@@ -179,6 +179,11 @@ namespace PowerLauncher
|
|||||||
_settings.ShouldUsePinyin = overloadSettings.Properties.UsePinyin;
|
_settings.ShouldUsePinyin = overloadSettings.Properties.UsePinyin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_settings.ShowPluginsOverview != (PowerToysRunSettings.ShowPluginsOverviewMode)overloadSettings.Properties.ShowPluginsOverview)
|
||||||
|
{
|
||||||
|
_settings.ShowPluginsOverview = (PowerToysRunSettings.ShowPluginsOverviewMode)overloadSettings.Properties.ShowPluginsOverview;
|
||||||
|
}
|
||||||
|
|
||||||
retry = false;
|
retry = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -127,6 +127,7 @@
|
|||||||
x:Name="border"
|
x:Name="border"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderBrush="Transparent"
|
BorderBrush="Transparent"
|
||||||
|
BorderThickness="1"
|
||||||
CornerRadius="4"
|
CornerRadius="4"
|
||||||
SnapsToDevicePixels="true">
|
SnapsToDevicePixels="true">
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
@@ -141,7 +142,7 @@
|
|||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="IsMouseOver" Value="true">
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
<Setter TargetName="border" Property="Background" Value="Transparent" />
|
<Setter TargetName="border" Property="Background" Value="Transparent" />
|
||||||
<Setter TargetName="border" Property="BorderBrush" Value="Transparent" />
|
<!--<Setter TargetName="border" Property="BorderBrush" Value="Transparent" />-->
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsSelected" Value="True">
|
<Trigger Property="IsSelected" Value="True">
|
||||||
<Setter TargetName="border" Property="Background" Value="{DynamicResource SubtleFillColorTertiaryBrush}" />
|
<Setter TargetName="border" Property="Background" Value="{DynamicResource SubtleFillColorTertiaryBrush}" />
|
||||||
@@ -151,4 +152,55 @@
|
|||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="ResultsListViewItemStyle" TargetType="{x:Type ListViewItem}">
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource ListViewItemForeground}" />
|
||||||
|
<Setter Property="Background" Value="Transparent" />
|
||||||
|
<Setter Property="Border.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
||||||
|
<Setter Property="Margin" Value="0,0,0,2" />
|
||||||
|
<Setter Property="Padding" Value="4" />
|
||||||
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type ListBoxItem}">
|
||||||
|
<Border
|
||||||
|
x:Name="Border"
|
||||||
|
Margin="0"
|
||||||
|
Padding="0"
|
||||||
|
Background="Transparent"
|
||||||
|
BorderThickness="1"
|
||||||
|
CornerRadius="{TemplateBinding Border.CornerRadius}">
|
||||||
|
<Grid>
|
||||||
|
<ContentPresenter Margin="{TemplateBinding Padding}" />
|
||||||
|
<Rectangle
|
||||||
|
x:Name="ActiveRectangle"
|
||||||
|
Width="3"
|
||||||
|
Height="24"
|
||||||
|
Margin="0"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Fill="{DynamicResource ListViewItemPillFillBrush}"
|
||||||
|
RadiusX="2"
|
||||||
|
RadiusY="2"
|
||||||
|
Visibility="Collapsed" />
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<MultiTrigger>
|
||||||
|
<MultiTrigger.Conditions>
|
||||||
|
<Condition Property="IsEnabled" Value="True" />
|
||||||
|
<Condition Property="IsMouseOver" Value="True" />
|
||||||
|
</MultiTrigger.Conditions>
|
||||||
|
<Setter TargetName="Border" Property="Background" Value="{DynamicResource SubtleFillColorTertiaryBrush}" />
|
||||||
|
|
||||||
|
</MultiTrigger>
|
||||||
|
<Trigger Property="IsSelected" Value="True">
|
||||||
|
<Setter TargetName="ActiveRectangle" Property="Visibility" Value="Visible" />
|
||||||
|
<Setter TargetName="Border" Property="Background" Value="{DynamicResource ControlAltFillColorQuarternaryBrush}" />
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
@@ -346,15 +346,8 @@ namespace PowerLauncher.ViewModel
|
|||||||
if (_queryText != value)
|
if (_queryText != value)
|
||||||
{
|
{
|
||||||
_queryText = value;
|
_queryText = value;
|
||||||
if (string.IsNullOrEmpty(_queryText) || string.IsNullOrWhiteSpace(_queryText))
|
|
||||||
{
|
|
||||||
PluginsOverviewVisibility = Visibility.Visible;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
PluginsOverviewVisibility = Visibility.Collapsed;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
SetPluginsOverviewVisibility();
|
||||||
OnPropertyChanged(nameof(QueryText));
|
OnPropertyChanged(nameof(QueryText));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -378,6 +371,18 @@ namespace PowerLauncher.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetPluginsOverviewVisibility()
|
||||||
|
{
|
||||||
|
if (_settings.ShowPluginsOverview != PowerToysRunSettings.ShowPluginsOverviewMode.None && (string.IsNullOrEmpty(_queryText) || string.IsNullOrWhiteSpace(_queryText)))
|
||||||
|
{
|
||||||
|
PluginsOverviewVisibility = Visibility.Visible;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PluginsOverviewVisibility = Visibility.Collapsed;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool LastQuerySelected { get; set; }
|
public bool LastQuerySelected { get; set; }
|
||||||
|
|
||||||
private ResultsViewModel _selectedResults;
|
private ResultsViewModel _selectedResults;
|
||||||
@@ -394,17 +399,17 @@ namespace PowerLauncher.ViewModel
|
|||||||
_selectedResults = value;
|
_selectedResults = value;
|
||||||
if (SelectedIsFromQueryResults())
|
if (SelectedIsFromQueryResults())
|
||||||
{
|
{
|
||||||
ContextMenu.Visibility = Visibility.Hidden;
|
ContextMenu.Visibility = Visibility.Collapsed;
|
||||||
History.Visibility = Visibility.Hidden;
|
History.Visibility = Visibility.Collapsed;
|
||||||
ChangeQueryText(_queryTextBeforeLeaveResults);
|
ChangeQueryText(_queryTextBeforeLeaveResults);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Results.Visibility = Visibility.Hidden;
|
Results.Visibility = Visibility.Collapsed;
|
||||||
_queryTextBeforeLeaveResults = QueryText;
|
_queryTextBeforeLeaveResults = QueryText;
|
||||||
}
|
}
|
||||||
|
|
||||||
_selectedResults.Visibility = Visibility.Visible;
|
_selectedResults.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -732,7 +737,7 @@ namespace PowerLauncher.ViewModel
|
|||||||
_updateSource?.Cancel();
|
_updateSource?.Cancel();
|
||||||
_currentQuery = _emptyQuery;
|
_currentQuery = _emptyQuery;
|
||||||
Results.SelectedItem = null;
|
Results.SelectedItem = null;
|
||||||
Results.Visibility = Visibility.Hidden;
|
Results.Visibility = Visibility.Collapsed;
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
lock (_addResultsLock)
|
lock (_addResultsLock)
|
||||||
@@ -769,7 +774,7 @@ namespace PowerLauncher.ViewModel
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Results.Visibility = Visibility.Hidden;
|
Results.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
@@ -1233,7 +1238,10 @@ namespace PowerLauncher.ViewModel
|
|||||||
|
|
||||||
foreach (var p in PluginManager.AllPlugins.Where(a => a.IsPluginInitialized && !a.Metadata.Disabled && a.Metadata.ActionKeyword != string.Empty))
|
foreach (var p in PluginManager.AllPlugins.Where(a => a.IsPluginInitialized && !a.Metadata.Disabled && a.Metadata.ActionKeyword != string.Empty))
|
||||||
{
|
{
|
||||||
Plugins.Add(p);
|
if (_settings.ShowPluginsOverview == PowerToysRunSettings.ShowPluginsOverviewMode.All || (_settings.ShowPluginsOverview == PowerToysRunSettings.ShowPluginsOverviewMode.NonGlobal && !p.Metadata.IsGlobal))
|
||||||
|
{
|
||||||
|
Plugins.Add(p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ namespace PowerLauncher.ViewModel
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return (_settings.MaxResultsToShow * 50) + 40;
|
return (_settings.MaxResultsToShow * 56) + 16;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ namespace PowerLauncher.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Visibility _visibility = Visibility.Hidden;
|
private Visibility _visibility = Visibility.Collapsed;
|
||||||
|
|
||||||
public Visibility Visibility
|
public Visibility Visibility
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -319,6 +319,15 @@ namespace Wox.Infrastructure.UserSettings
|
|||||||
|
|
||||||
public bool RememberLastLaunchLocation { get; set; }
|
public bool RememberLastLaunchLocation { get; set; }
|
||||||
|
|
||||||
|
public enum ShowPluginsOverviewMode
|
||||||
|
{
|
||||||
|
All,
|
||||||
|
NonGlobal,
|
||||||
|
None,
|
||||||
|
}
|
||||||
|
|
||||||
|
public ShowPluginsOverviewMode ShowPluginsOverview { get; set; } = ShowPluginsOverviewMode.All;
|
||||||
|
|
||||||
public bool IgnoreHotkeysOnFullscreen { get; set; }
|
public bool IgnoreHotkeysOnFullscreen { get; set; }
|
||||||
|
|
||||||
public bool StartedFromPowerToysRunner { get; set; }
|
public bool StartedFromPowerToysRunner { get; set; }
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
|||||||
[JsonPropertyName("theme")]
|
[JsonPropertyName("theme")]
|
||||||
public Theme Theme { get; set; }
|
public Theme Theme { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("show_plugins_overview")]
|
||||||
|
public int ShowPluginsOverview { get; set; }
|
||||||
|
|
||||||
[JsonPropertyName("startupPosition")]
|
[JsonPropertyName("startupPosition")]
|
||||||
public StartupPosition Position { get; set; }
|
public StartupPosition Position { get; set; }
|
||||||
|
|
||||||
@@ -107,6 +110,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library
|
|||||||
SearchWaitForSlowResults = false;
|
SearchWaitForSlowResults = false;
|
||||||
GenerateThumbnailsFromFiles = true;
|
GenerateThumbnailsFromFiles = true;
|
||||||
UsePinyin = false;
|
UsePinyin = false;
|
||||||
|
ShowPluginsOverview = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ namespace ViewModelTests
|
|||||||
Assert.AreEqual(originalSettings.Properties.SearchTypePreference, viewModel.SearchTypePreference);
|
Assert.AreEqual(originalSettings.Properties.SearchTypePreference, viewModel.SearchTypePreference);
|
||||||
Assert.AreEqual(originalSettings.Properties.GenerateThumbnailsFromFiles, viewModel.GenerateThumbnailsFromFiles);
|
Assert.AreEqual(originalSettings.Properties.GenerateThumbnailsFromFiles, viewModel.GenerateThumbnailsFromFiles);
|
||||||
Assert.AreEqual(originalSettings.Properties.UsePinyin, viewModel.UsePinyin);
|
Assert.AreEqual(originalSettings.Properties.UsePinyin, viewModel.UsePinyin);
|
||||||
|
Assert.AreEqual(originalSettings.Properties.ShowPluginsOverview, viewModel.ShowPluginsOverviewIndex);
|
||||||
|
|
||||||
// Verify that the stub file was used
|
// Verify that the stub file was used
|
||||||
var expectedCallCount = 2; // once via the view model, and once by the test (GetSettings<T>)
|
var expectedCallCount = 2; // once via the view model, and once by the test (GetSettings<T>)
|
||||||
|
|||||||
@@ -157,10 +157,9 @@
|
|||||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.UsePinyin, Mode=TwoWay}" />
|
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.UsePinyin, Mode=TwoWay}" />
|
||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
|
|
||||||
<controls:SettingsCard x:Uid="PowerLauncher_GenerateThumbnailsFromFiles">
|
<controls:SettingsCard x:Uid="PowerLauncher_GenerateThumbnailsFromFiles" HeaderIcon="{ui:FontIcon Glyph=}">
|
||||||
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.GenerateThumbnailsFromFiles, Mode=TwoWay}" />
|
<ToggleSwitch x:Uid="ToggleSwitch" IsOn="{x:Bind ViewModel.GenerateThumbnailsFromFiles, Mode=TwoWay}" />
|
||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
|
|
||||||
</custom:SettingsGroup>
|
</custom:SettingsGroup>
|
||||||
|
|
||||||
<!--<ComboBox x:Uid="PowerLauncher_SearchResultPreference"
|
<!--<ComboBox x:Uid="PowerLauncher_SearchResultPreference"
|
||||||
@@ -202,6 +201,14 @@
|
|||||||
<ComboBoxItem x:Uid="Radio_Theme_Default" />
|
<ComboBoxItem x:Uid="Radio_Theme_Default" />
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
</controls:SettingsCard>
|
</controls:SettingsCard>
|
||||||
|
|
||||||
|
<controls:SettingsCard x:Uid="PowerLauncher_ShowPluginKeywords" HeaderIcon="{ui:FontIcon Glyph=}">
|
||||||
|
<ComboBox MinWidth="{StaticResource SettingActionControlMinWidth}" SelectedIndex="{x:Bind Mode=TwoWay, Path=ViewModel.ShowPluginsOverviewIndex}">
|
||||||
|
<ComboBoxItem x:Uid="ShowPluginsOverview_All" />
|
||||||
|
<ComboBoxItem x:Uid="ShowPluginsOverview_NonGlobal" />
|
||||||
|
<ComboBoxItem x:Uid="ShowPluginsOverview_None" />
|
||||||
|
</ComboBox>
|
||||||
|
</controls:SettingsCard>
|
||||||
</custom:SettingsGroup>
|
</custom:SettingsGroup>
|
||||||
|
|
||||||
<custom:SettingsGroup x:Uid="PowerLauncher_Plugins" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
|
<custom:SettingsGroup x:Uid="PowerLauncher_Plugins" IsEnabled="{x:Bind Mode=OneWay, Path=ViewModel.EnablePowerLauncher}">
|
||||||
|
|||||||
@@ -59,7 +59,10 @@
|
|||||||
: using a System.ComponentModel.TypeConverter
|
: using a System.ComponentModel.TypeConverter
|
||||||
: and then encoded with base64 encoding.
|
: and then encoded with base64 encoding.
|
||||||
-->
|
-->
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
<xsd:schema id="root"
|
||||||
|
xmlns=""
|
||||||
|
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||||
|
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
<xsd:complexType>
|
<xsd:complexType>
|
||||||
@@ -2183,7 +2186,7 @@ From there, simply click on one of the supported files in the File Explorer and
|
|||||||
<value>Welcome to PowerToys</value>
|
<value>Welcome to PowerToys</value>
|
||||||
<comment>Don't loc "PowerToys"</comment>
|
<comment>Don't loc "PowerToys"</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="WhatIsNew_NavViewItem.Content" xml:space="preserve">
|
<data name="WhatIsNew_NavViewItem.Content" xml:space="preserve">
|
||||||
<value>What's New</value>
|
<value>What's New</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Feedback_NavViewItem.Content" xml:space="preserve">
|
<data name="Feedback_NavViewItem.Content" xml:space="preserve">
|
||||||
@@ -2996,6 +2999,12 @@ Right-click to remove the key combination, thereby deactivating the shortcut.</v
|
|||||||
<data name="PowerLauncher_WaitForSlowResults.Header" xml:space="preserve">
|
<data name="PowerLauncher_WaitForSlowResults.Header" xml:space="preserve">
|
||||||
<value>Wait on slower plugin results before selecting top item in results</value>
|
<value>Wait on slower plugin results before selecting top item in results</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="PowerLauncher_ShowPluginKeywords.Header" xml:space="preserve">
|
||||||
|
<value>Plugin hints</value>
|
||||||
|
</data>
|
||||||
|
<data name="PowerLauncher_ShowPluginKeywords.Description" xml:space="preserve">
|
||||||
|
<value>Choose which plugin keywords to be shown when the searchbox is empty</value>
|
||||||
|
</data>
|
||||||
<data name="PowerLauncher_PluginWeightBoost.Description" xml:space="preserve">
|
<data name="PowerLauncher_PluginWeightBoost.Description" xml:space="preserve">
|
||||||
<value>Use a higher number to have this plugin's result show higher in the global results. Default is 0.</value>
|
<value>Use a higher number to have this plugin's result show higher in the global results. Default is 0.</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -3364,7 +3373,7 @@ Activate by holding the key for the character you want to add an accent to, then
|
|||||||
<value>German</value>
|
<value>German</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="QuickAccent_SelectedLanguage_Greek.Content" xml:space="preserve">
|
<data name="QuickAccent_SelectedLanguage_Greek.Content" xml:space="preserve">
|
||||||
<value>Greek</value>
|
<value>Greek</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="QuickAccent_SelectedLanguage_Hebrew.Content" xml:space="preserve">
|
<data name="QuickAccent_SelectedLanguage_Hebrew.Content" xml:space="preserve">
|
||||||
<value>Hebrew</value>
|
<value>Hebrew</value>
|
||||||
@@ -3898,4 +3907,13 @@ Activate by holding the key for the character you want to add an accent to, then
|
|||||||
<data name="Peek_SourceCode_WrapText.Content" xml:space="preserve">
|
<data name="Peek_SourceCode_WrapText.Content" xml:space="preserve">
|
||||||
<value>Wrap text</value>
|
<value>Wrap text</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ShowPluginsOverview_All.Content" xml:space="preserve">
|
||||||
|
<value>All</value>
|
||||||
|
</data>
|
||||||
|
<data name="ShowPluginsOverview_None.Content" xml:space="preserve">
|
||||||
|
<value>None</value>
|
||||||
|
</data>
|
||||||
|
<data name="ShowPluginsOverview_NonGlobal.Content" xml:space="preserve">
|
||||||
|
<value>Not included in global results</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -597,6 +597,23 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int ShowPluginsOverviewIndex
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return settings.Properties.ShowPluginsOverview;
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (settings.Properties.ShowPluginsOverview != value)
|
||||||
|
{
|
||||||
|
settings.Properties.ShowPluginsOverview = value;
|
||||||
|
UpdateSettings();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private ObservableCollection<PowerLauncherPluginViewModel> _plugins;
|
private ObservableCollection<PowerLauncherPluginViewModel> _plugins;
|
||||||
|
|
||||||
public ObservableCollection<PowerLauncherPluginViewModel> Plugins
|
public ObservableCollection<PowerLauncherPluginViewModel> Plugins
|
||||||
|
|||||||
Reference in New Issue
Block a user