mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-30 08:56:33 +01:00
Compare commits
4 Commits
0.87_relea
...
v0.87.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
799f7396d2 | ||
|
|
e77ea96a14 | ||
|
|
6f23fb503b | ||
|
|
feeeec644c |
@@ -263,7 +263,7 @@ namespace AdvancedPaste
|
||||
if (disposing)
|
||||
{
|
||||
EtwTrace?.Dispose();
|
||||
window.Dispose();
|
||||
window?.Dispose();
|
||||
}
|
||||
|
||||
disposedValue = true;
|
||||
|
||||
@@ -154,8 +154,8 @@ namespace AdvancedPaste.Settings
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
_cancellationTokenSource.Dispose();
|
||||
_watcher.Dispose();
|
||||
_cancellationTokenSource?.Dispose();
|
||||
_watcher?.Dispose();
|
||||
}
|
||||
|
||||
_disposedValue = true;
|
||||
|
||||
@@ -27,109 +27,111 @@
|
||||
WindowStartupLocation="Manual"
|
||||
WindowStyle="None"
|
||||
mc:Ignorable="d">
|
||||
<Grid x:Name="RootGrid" MouseDown="OnMouseDown">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" MaxHeight="{Binding Results.MaxHeight}" />
|
||||
</Grid.RowDefinitions>
|
||||
<Border
|
||||
x:Name="SearchBoxBorder"
|
||||
Grid.Row="0"
|
||||
Padding="12,4,12,3">
|
||||
<local:LauncherControl x:Name="SearchBox" />
|
||||
</Border>
|
||||
|
||||
<!-- Have to use a Grid instead of a StackPanel for scrolling to work? -->
|
||||
<Grid
|
||||
x:Name="KeywordsOverviewGrid"
|
||||
Grid.Row="1"
|
||||
MaxHeight="{Binding Results.MaxHeight}"
|
||||
Visibility="{Binding PluginsOverviewVisibility}">
|
||||
<Border x:Name="MainBorder" BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}">
|
||||
<Grid x:Name="RootGrid" MouseDown="OnMouseDown">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" MaxHeight="{Binding Results.MaxHeight}" />
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle
|
||||
Height="1"
|
||||
VerticalAlignment="Top"
|
||||
Fill="{DynamicResource DividerStrokeColorDefaultBrush}" />
|
||||
<TextBlock
|
||||
Margin="22,12,0,4"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{x:Static p:Resources.PluginKeywords}" />
|
||||
<Border
|
||||
x:Name="SearchBoxBorder"
|
||||
Grid.Row="0"
|
||||
Padding="12,4,12,3">
|
||||
<local:LauncherControl x:Name="SearchBox" />
|
||||
</Border>
|
||||
|
||||
<ListView
|
||||
x:Name="pluginsHintsList"
|
||||
<!-- Have to use a Grid instead of a StackPanel for scrolling to work? -->
|
||||
<Grid
|
||||
x:Name="KeywordsOverviewGrid"
|
||||
Grid.Row="1"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
ItemContainerStyle="{StaticResource PluginsListViewItemStyle}"
|
||||
ItemsSource="{Binding Plugins}"
|
||||
PreviewMouseLeftButtonUp="PluginsHintsList_PreviewMouseLeftButtonUp"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
SelectedItem="{Binding SelectedPlugin, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<ListView.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel
|
||||
Margin="16,0"
|
||||
IsVirtualizing="{TemplateBinding VirtualizingPanel.IsVirtualizing}"
|
||||
VirtualizationMode="{TemplateBinding VirtualizingPanel.VirtualizationMode}" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListView.ItemsPanel>
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border
|
||||
Width="32"
|
||||
Height="32"
|
||||
Padding="2,0,2,0"
|
||||
Background="{DynamicResource ControlFillColorDefaultBrush}"
|
||||
BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4"
|
||||
ToolTipService.ToolTip="{Binding Metadata.ActionKeyword}">
|
||||
MaxHeight="{Binding Results.MaxHeight}"
|
||||
Visibility="{Binding PluginsOverviewVisibility}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Rectangle
|
||||
Height="1"
|
||||
VerticalAlignment="Top"
|
||||
Fill="{DynamicResource DividerStrokeColorDefaultBrush}" />
|
||||
<TextBlock
|
||||
Margin="22,12,0,4"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{x:Static p:Resources.PluginKeywords}" />
|
||||
|
||||
<ListView
|
||||
x:Name="pluginsHintsList"
|
||||
Grid.Row="1"
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
ItemContainerStyle="{StaticResource PluginsListViewItemStyle}"
|
||||
ItemsSource="{Binding Plugins}"
|
||||
PreviewMouseLeftButtonUp="PluginsHintsList_PreviewMouseLeftButtonUp"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
SelectedItem="{Binding SelectedPlugin, Mode=TwoWay}"
|
||||
SelectionMode="Single">
|
||||
<ListView.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<VirtualizingStackPanel
|
||||
Margin="16,0"
|
||||
IsVirtualizing="{TemplateBinding VirtualizingPanel.IsVirtualizing}"
|
||||
VirtualizationMode="{TemplateBinding VirtualizingPanel.VirtualizationMode}" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListView.ItemsPanel>
|
||||
<ListView.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border
|
||||
Width="32"
|
||||
Height="32"
|
||||
Padding="2,0,2,0"
|
||||
Background="{DynamicResource ControlFillColorDefaultBrush}"
|
||||
BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="4"
|
||||
ToolTipService.ToolTip="{Binding Metadata.ActionKeyword}">
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
Text="{Binding Metadata.ActionKeyword}"
|
||||
TextAlignment="Left"
|
||||
TextTrimming="WordEllipsis" />
|
||||
</Border>
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
Grid.Column="1"
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
Text="{Binding Metadata.ActionKeyword}"
|
||||
TextAlignment="Left"
|
||||
TextTrimming="WordEllipsis" />
|
||||
</Border>
|
||||
<TextBlock
|
||||
Grid.Column="1"
|
||||
Margin="12,0,0,0"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
Text="{Binding Plugin.Description}"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
Text="{Binding Plugin.Description}"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
TextWrapping="Wrap" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListView.ItemTemplate>
|
||||
</ListView>
|
||||
</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>
|
||||
|
||||
<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>
|
||||
</Border>
|
||||
<Window.InputBindings>
|
||||
<KeyBinding Key="Escape" Command="{Binding EscCommand}" />
|
||||
<KeyBinding Key="Enter" Command="{Binding OpenResultWithKeyboardCommand}" />
|
||||
|
||||
@@ -200,6 +200,11 @@ namespace PowerLauncher
|
||||
DWM_WINDOW_CORNER_PREFERENCE preference = DWM_WINDOW_CORNER_PREFERENCE.DWMWCP_ROUND;
|
||||
DwmSetWindowAttribute(hWnd, attribute, ref preference, sizeof(uint));
|
||||
}
|
||||
else
|
||||
{
|
||||
// On Windows10 ResizeMode="NoResize" removes the border so we add a new one.
|
||||
MainBorder.BorderThickness = new System.Windows.Thickness(0.5);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnLoaded(object sender, RoutedEventArgs e)
|
||||
|
||||
@@ -238,7 +238,10 @@ namespace PowerLauncher.Plugin
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Exception($"Exception for plugin <{pair.Metadata.Name}> when query <{query}>", e, MethodBase.GetCurrentMethod().DeclaringType);
|
||||
// After updating to .NET 9, calling MethodBase.GetCurrentMethod() started crashing when trying
|
||||
// to log methods called from within the OneNote plugin, so we've replaced this instance with typeof(PluginManager).
|
||||
// This should be revised in the future.
|
||||
Log.Exception($"Exception for plugin <{pair.Metadata.Name}> when query <{query}>", e, typeof(PluginManager));
|
||||
|
||||
return new List<Result>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user