mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
Somil55/merge wpf to master (#3840)
* Basic WPF searchbox working * Updated key navigation and removed coldstart for searhbox * refactored and added code back in commented * Removed XAML Island references * Basic searchbox+listview working * Getting a bit more back * got color there * Result list bit better now * Added image loader for WPF Image * Partially got the context menus rendering again * adjusting coldstart to load, control will load with main form * getting context menus back * mouse over works now * Click now works, started to remove Win.XAML references * being a bit more forcusful on focus * Shadow text is not aligned * fixing focus if listbox was used * small tweak to fix shadow text * inputs don't work but gotta figure out why. commenting out * preview text * adding back in delay * fixed height issue * Applied the correct context button styles * Created custom ItemContainerStyle to fix the blue highlights behind the command buttons * Applied the correct highlight / mouseover styling * Removed vertical scrollbar in listview * fixed for alt-space prompt * Fixed right click focus issue * Somil55/wpf modifier keys (#3378) * Removed DPI change as it was not required * Global key hooks for context menu items * Updated Key for shell, folder and indexer plugin * Updated key mapping for indexer plugin * Somil55/wpf context menu selection (#3389) * Removed DPI change as it was not required * Global key hooks for context menu items * Updated Key for shell, folder and indexer plugin * Updated key mapping for indexer plugin * Add trigger to selection on tabbing * Minor shadow adjustments so its more similiar to default shell shadow. Added intro/outro animations * Added UWP-like scrollbar style for the results list * Fixed formating and naming * Removed Powerlauncher UI project * Update PowerToys.sln * Commented out scrollbar and fade in/out animations * Added missing features from UWP branch * Fixed formatting for Product.wxs * Add dragging to WPF window Co-authored-by: Clint Rutkas <clint@rutkas.com> Co-authored-by: Niels Laute <niels.laute@live.nl>
This commit is contained in:
committed by
GitHub
parent
5680a34ec1
commit
397b1533f0
@@ -45,7 +45,7 @@
|
||||
<Setter Property="Foreground" Value="Transparent"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=Text, RelativeSource={RelativeSource TemplatedParent}}" Value="">
|
||||
<Setter Property="Foreground" Value="LightGray"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource TextControlPlaceholderForeground}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
@@ -79,155 +79,11 @@
|
||||
</MultiTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="TextBox" x:Key="CustomAutoSuggestBoxTextBoxStyle">
|
||||
<!--<Setter Property="MinWidth" Value="{ThemeResource TextControlThemeMinWidth}" />
|
||||
<Setter Property="MinHeight" Value="{ThemeResource TextControlThemeMinHeight}" />
|
||||
<Setter Property="Foreground" Value="{ThemeResource TextControlForeground}" />-->
|
||||
|
||||
<!--<Setter Property="BorderBrush" Value="{ThemeResource TextControlBorderBrush}" />
|
||||
<Setter Property="SelectionHighlightColor" Value="{ThemeResource TextControlSelectionHighlightColor}" />-->
|
||||
|
||||
<!--<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
|
||||
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
|
||||
<Setter Property="ScrollViewer.HorizontalScrollMode" Value="Auto" />
|
||||
<Setter Property="ScrollViewer.VerticalScrollMode" Value="Auto" />
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
|
||||
<Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
|
||||
-->
|
||||
|
||||
<!--<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TextBox}">
|
||||
<Grid>
|
||||
<TextBox
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Text="{TemplateBinding Tag}"
|
||||
Panel.ZIndex="0">
|
||||
<TextBox.Style>
|
||||
<Style TargetType="{x:Type TextBox}">
|
||||
<Setter Property="Foreground" Value="Transparent"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding Path=Text, Source={x:Reference textSource}}" Value="">
|
||||
<Setter Property="Foreground" Value="DarkGray"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBox.Style>
|
||||
</TextBox>
|
||||
<TextBox
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
AcceptsReturn="{TemplateBinding AcceptsReturn}"
|
||||
AcceptsTab="{TemplateBinding AcceptsTab}"
|
||||
Text="{Binding Path=Text}"
|
||||
x:Name="textSource"
|
||||
Background="Transparent"
|
||||
Panel.ZIndex="2" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>-->
|
||||
<!-- <Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="TextBox">
|
||||
<Grid>
|
||||
b<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Disabled">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Background">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBackgroundDisabled}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBorderBrushDisabled}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlForegroundDisabled}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContentPresenter" Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlPlaceholderForegroundDisabled}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="PointerOver">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBorderBrushPointerOver}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContentPresenter" Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="#FF7e7e7e" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource PrimaryTextColor}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Focused">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBorderBrushFocused}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource PrimaryTextColor}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="RequestedTheme">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Light" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<Border
|
||||
x:Name="BorderElement"
|
||||
Grid.Row="1"
|
||||
Background="Transparent"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
Grid.ColumnSpan="3"
|
||||
Grid.RowSpan="1" />
|
||||
<ScrollViewer
|
||||
x:Name="ContentElement"
|
||||
Grid.Row="1"
|
||||
HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
|
||||
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
||||
VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
|
||||
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
|
||||
IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
|
||||
IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
|
||||
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
|
||||
IsTabStop="False"
|
||||
Margin="12,0,0,0"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
CornerRadius="4"
|
||||
VerticalAlignment="Center"
|
||||
AutomationProperties.AccessibilityView="Raw"
|
||||
ZoomMode="Disabled" />
|
||||
<ContentControl
|
||||
x:Name="PlaceholderTextContentPresenter"
|
||||
Grid.Row="1"
|
||||
Opacity="0.6"
|
||||
Foreground="{DynamicResource TextControlPlaceholderForeground}"
|
||||
Margin="12,0,0,0"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
IsTabStop="False"
|
||||
Grid.ColumnSpan="3"
|
||||
VerticalAlignment="Center"
|
||||
Content="{TemplateBinding PlaceholderText}"
|
||||
IsHitTestVisible="False" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>-->
|
||||
</Style>
|
||||
</UserControl.Resources>
|
||||
<Grid
|
||||
Height="60"
|
||||
Height="68"
|
||||
VerticalAlignment="Top">
|
||||
<!--Background="{ThemeResource BackdropAcrylicBrush}"-->
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="64"/>
|
||||
@@ -241,6 +97,7 @@
|
||||
Margin="24, 0, 0, 0"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="24"
|
||||
Foreground="{DynamicResource TextControlPlaceholderForeground}"
|
||||
/>
|
||||
|
||||
<!--
|
||||
@@ -260,14 +117,12 @@
|
||||
/>
|
||||
|
||||
<TextBlock
|
||||
x:Name="SearchLogo"
|
||||
x:FieldModifier="public"
|
||||
Grid.Column="1"
|
||||
Text=""
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
FontSize="24"
|
||||
HorizontalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
/>
|
||||
Foreground="{DynamicResource TextControlPlaceholderForeground}" />
|
||||
</Grid>
|
||||
</UserControl>
|
||||
Reference in New Issue
Block a user