mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
XAML style checkers aren't running right now in PR CI. This allowed some XAML style errors to cause build errors in release CI. This PR contains the following fixes: - Fix XAML style of files that have slipped. - Add errors to the scripts that depend on dotnet commands if it fails. - Add .NET 6 on CI so that applyXamlStyling.ps1 and verifyNugetPackages.ps1 run correctly again.
150 lines
6.8 KiB
XML
150 lines
6.8 KiB
XML
<ui:FluentWindow
|
|
x:Class="PowerLauncher.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:PowerLauncher"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:p="clr-namespace:PowerLauncher.Properties"
|
|
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
|
xmlns:vm="clr-namespace:PowerLauncher.ViewModel"
|
|
Title="PowerToys Run"
|
|
Width="640"
|
|
MinHeight="0"
|
|
d:DataContext="{d:DesignInstance vm:MainViewModel}"
|
|
ui:ExtendsContentIntoTitleBar="True"
|
|
AllowDrop="True"
|
|
Closed="OnClosed"
|
|
Closing="OnClosing"
|
|
Deactivated="OnDeactivated"
|
|
IsVisibleChanged="OnVisibilityChanged"
|
|
Loaded="OnLoaded"
|
|
LocationChanged="OnLocationChanged"
|
|
ResizeMode="NoResize"
|
|
ShowInTaskbar="False"
|
|
SizeToContent="Height"
|
|
SourceInitialized="OnSourceInitialized"
|
|
Topmost="True"
|
|
Visibility="{Binding MainWindowVisibility, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
WindowStartupLocation="Manual"
|
|
WindowStyle="None"
|
|
mc:Ignorable="d">
|
|
|
|
<Grid x:Name="RootGrid" MouseDown="OnMouseDown">
|
|
<!-- We set the background here because the Acrylic can be too translucent / background too bright on Light theme -->
|
|
<Grid.Background>
|
|
<SolidColorBrush Opacity="0.8" Color="{DynamicResource ApplicationBackgroundColor}" />
|
|
</Grid.Background>
|
|
<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}">
|
|
<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"
|
|
Margin="16,0,0,0"
|
|
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
|
|
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>
|
|
</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>
|
|
<ui:FluentWindow.InputBindings>
|
|
<KeyBinding Key="Escape" Command="{Binding EscCommand}" />
|
|
<KeyBinding Key="Enter" Command="{Binding OpenResultWithKeyboardCommand}" />
|
|
<KeyBinding
|
|
Key="F4"
|
|
Command="{Binding IgnoreCommand}"
|
|
Modifiers="Alt" />
|
|
</ui:FluentWindow.InputBindings>
|
|
</ui:FluentWindow>
|