mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
* New design
* Updating icons
* Adding keywords
* Only show plugins when search query is empty
* Update App.xaml
* Update App.xaml
* Filter plugins
* Fix image name
* refresh plugins overview
* fix context menu icons in win10
* Remove unused animations
* Resolving crashing
* Fix focus visual and a11y
* Remove unused styles
* Revert "Remove unused styles"
This reverts commit 65f29ae6ed.
* Fix value generator light vs dark icon
* Fix tab characters
* Fix CI
* Update SettingsReader.cs
* Adding common OS check helper
* Update MainWindow.xaml.cs
* Fix background
* More tweaks
* XAML styler and updating legacy brushes
* Updates + xaml styling
* Fix CI
* Fix CI2
* fix font family and overview refresh
* Delete shutdown.light-1.png
* Updating icons
* Set DPI
---------
Co-authored-by: Davide Giacometti <davide.giacometti@outlook.it>
124 lines
5.5 KiB
XML
124 lines
5.5 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"
|
|
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="*" MaxHeight="{Binding Results.MaxHeight}" />
|
|
</Grid.RowDefinitions>
|
|
<Border
|
|
x:Name="SearchBoxBorder"
|
|
Grid.Row="0"
|
|
Margin="12,12,12,0"
|
|
Background="{DynamicResource LayerFillColorDefaultBrush}"
|
|
BorderBrush="{DynamicResource SurfaceStrokeColorDefaultBrush}"
|
|
BorderThickness="1"
|
|
CornerRadius="8">
|
|
<local:LauncherControl x:Name="SearchBox" />
|
|
</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? -->
|
|
<Grid
|
|
x:Name="KeywordsOverviewGrid"
|
|
Grid.Row="1"
|
|
Margin="12,0,0,0"
|
|
Visibility="{Binding PluginsOverviewVisibility}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock
|
|
Margin="10,16,0,8"
|
|
FontWeight="SemiBold"
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
Text="{x:Static p:Resources.PluginKeywords}" />
|
|
|
|
<ListView
|
|
Grid.Row="1"
|
|
ItemContainerStyle="{StaticResource PluginsListViewItemStyle}"
|
|
ItemsSource="{Binding Plugins}"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
SelectionMode="Single">
|
|
<ListView.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid Height="36">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Border
|
|
Width="32"
|
|
Height="32"
|
|
Margin="4,0,10,0"
|
|
Background="{DynamicResource ControlFillColorDefaultBrush}"
|
|
BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
|
|
BorderThickness="1"
|
|
CornerRadius="4">
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
FontWeight="SemiBold"
|
|
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
|
Text="{Binding Metadata.ActionKeyword}" />
|
|
</Border>
|
|
<TextBlock
|
|
Grid.Column="1"
|
|
VerticalAlignment="Center"
|
|
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
|
Text="{Binding Plugin.Description}"
|
|
TextTrimming="CharacterEllipsis" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListView.ItemTemplate>
|
|
</ListView>
|
|
</Grid>
|
|
</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>
|