[PTRun]Fluent UX and switch to WpfUI (#28538)

* 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>
This commit is contained in:
Niels Laute
2023-11-20 11:23:26 +01:00
committed by GitHub
parent 67b18d0e98
commit c095cdde4e
131 changed files with 772 additions and 745 deletions

View File

@@ -2,99 +2,93 @@
x:Class="PowerLauncher.LauncherControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:p="clr-namespace:PowerLauncher.Properties"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:PowerLauncher"
xmlns:ui="http://schemas.modernwpf.com/2019"
mc:Ignorable="d"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:p="clr-namespace:PowerLauncher.Properties"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
d:DesignHeight="300"
d:DesignWidth="720">
d:DesignWidth="720"
mc:Ignorable="d">
<UserControl.Resources>
<Style x:Key="QueryTextBoxStyle" TargetType="{x:Type TextBox}">
<Style
x:Key="QueryTextBoxStyle"
BasedOn="{StaticResource DefaultTextBoxStyle}"
TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Foreground" Value="{DynamicResource ControlTextBrushKey}"/>
<Setter Property="CaretBrush" Value="{DynamicResource ControlTextBrushKey}"/>
<Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="AllowDrop" Value="true"/>
<Setter Property="ContextMenu" Value="{DynamicResource TextControlContextMenu}" />
<Setter Property="ui:TextContextMenu.UsingTextContextMenu" Value="True" />
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="Padding" Value="12,0,0,0" />
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
<Setter Property="CaretBrush" Value="{DynamicResource TextFillColorPrimaryBrush}" />
<Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="AllowDrop" Value="true" />
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
<Setter Property="Padding" Value="5,0,0,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TextBox}">
<Grid>
<TextBlock Margin="14, 0, 0, 0"
Text="{TemplateBinding Tag}">
<TextBlock
Margin="6,0,0,0"
VerticalAlignment="Center"
FontSize="16"
Text="{TemplateBinding Tag}">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="Transparent"/>
<Setter Property="Foreground" Value="Transparent" />
<Style.Triggers>
<DataTrigger Binding="{Binding Path=Text, RelativeSource={RelativeSource TemplatedParent}}" Value="">
<Setter Property="Foreground" Value="{DynamicResource TextControlPlaceholderForeground}"/>
<Setter Property="Foreground" Value="{DynamicResource TextPlaceholderColorBrush}" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<Border x:Name="border"
<Border
x:Name="border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="True">
<ScrollViewer
x:Name="PART_ContentHost"
Background="{TemplateBinding Background}"
BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}"
SnapsToDevicePixels="True">
<ScrollViewer x:Name="PART_ContentHost"
Background="{TemplateBinding Background}"
Focusable="false"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden">
Focusable="false"
HorizontalScrollBarVisibility="Hidden"
VerticalScrollBarVisibility="Hidden">
<ScrollViewer.ContentTemplate>
<DataTemplate>
<Grid
Background="{Binding Background, ElementName=PART_ContentHost}">
<ContentPresenter Content="{Binding Path=Content, ElementName=PART_ContentHost}"/>
<Grid Background="{Binding Background, ElementName=PART_ContentHost}">
<ContentPresenter Content="{Binding Path=Content, ElementName=PART_ContentHost}" />
</Grid>
</DataTemplate>
</ScrollViewer.ContentTemplate>
</ScrollViewer>
</Border>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Opacity" TargetName="border" Value="0.56"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource TextBox.MouseOver.Border}"/>
</Trigger>
<Trigger Property="IsKeyboardFocused" Value="true">
<Setter Property="BorderBrush" TargetName="border" Value="{StaticResource TextBox.Focus.Border}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsInactiveSelectionHighlightEnabled" Value="true"/>
<Condition Property="IsSelectionActive" Value="false"/>
<Condition Property="IsInactiveSelectionHighlightEnabled" Value="true" />
<Condition Property="IsSelectionActive" Value="false" />
</MultiTrigger.Conditions>
<Setter Property="SelectionBrush" Value="{DynamicResource InactiveSelectionHighlightBrushKey}"/>
<Setter Property="SelectionBrush" Value="{DynamicResource TextOnAccentFillColorSelectedTextBrush}" />
</MultiTrigger>
</Style.Triggers>
</Style>
</UserControl.Resources>
<Grid
Height="68"
<Grid
MinHeight="32"
Margin="12"
VerticalAlignment="Top">
<!--Background="{ThemeResource BackdropAcrylicBrush}"-->
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="72"/>
<ColumnDefinition Width="32" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!--
@@ -102,36 +96,28 @@
https://stackoverflow.com/questions/11873378/adding-placeholder-text-to-textbox
-->
<local:CustomSearchBox
AutomationProperties.Name="{x:Static p:Resources.Query}"
x:Name="QueryTextBox"
x:FieldModifier="public"
Canvas.ZIndex="0"
Margin="10, 0, 0, 0"
Grid.Column="1"
VerticalAlignment="Center"
FontSize="24"
x:FieldModifier="public"
AutomationProperties.Name="{x:Static p:Resources.Query}"
Canvas.ZIndex="0"
FontSize="18"
Style="{StaticResource QueryTextBoxStyle}"
Tag="{x:Static p:Resources.startTyping}"
/>
Tag="{x:Static p:Resources.startTyping}" />
<TextBlock
x:Name="AutoCompleteTextBlock"
x:FieldModifier="public"
Opacity="0.6"
Canvas.ZIndex="-1"
Margin="24, 0, 14, 0"
VerticalAlignment="Center"
FontSize="24"
Foreground="{DynamicResource TextControlPlaceholderForeground}"
Background="{DynamicResource SystemChromeLow}"
/>
<TextBlock
AutomationProperties.Name="{x:Static p:Resources.SearchIcon}"
Grid.Column="1"
Text="&#xE721;"
FontFamily="Segoe MDL2 Assets"
FontSize="26"
HorizontalAlignment="Center"
Margin="7,0,14,0"
VerticalAlignment="Center"
Foreground="{DynamicResource TextControlPlaceholderForeground}"
SnapsToDevicePixels="True"/>
x:FieldModifier="public"
Canvas.ZIndex="-1"
FontSize="18"
Foreground="{DynamicResource TextPlaceholderColorBrush}" />
<ui:SymbolIcon
AutomationProperties.Name="{x:Static p:Resources.SearchIcon}"
FontSize="18"
Foreground="{DynamicResource TextPlaceholderColorBrush}"
Symbol="Search12" />
</Grid>
</UserControl>