mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[PowerRename] Adding mica (#27509)
* Adding mica + other improvements * Address feedback
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -17,6 +17,27 @@
|
|||||||
<!-- Error tooltip -->
|
<!-- Error tooltip -->
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<VisualStateManager.VisualStateGroups>
|
||||||
|
<VisualStateGroup x:Name="CommonStates">
|
||||||
|
<VisualState x:Name="Normal" />
|
||||||
|
<VisualState x:Name="Highlight">
|
||||||
|
<VisualState.Setters>
|
||||||
|
<Setter Target="HighlightBorder.Opacity" Value="0.1" />
|
||||||
|
<Setter Target="HighlightBorder.BorderBrush" Value="{ThemeResource AccentTextFillColorPrimaryBrush}" />
|
||||||
|
<Setter Target="HighlightBorder.Background" Value="{ThemeResource AccentTextFillColorPrimaryBrush}" />
|
||||||
|
</VisualState.Setters>
|
||||||
|
</VisualState>
|
||||||
|
<VisualState x:Name="Error">
|
||||||
|
<VisualState.Setters>
|
||||||
|
<Setter Target="HighlightBorder.Opacity" Value="1" />
|
||||||
|
<Setter Target="HighlightBorder.BorderBrush" Value="{ThemeResource SystemFillColorCriticalBackgroundBrush}" />
|
||||||
|
<Setter Target="HighlightBorder.Background" Value="{ThemeResource SystemFillColorCriticalBackgroundBrush}" />
|
||||||
|
<Setter Target="ErrorIcon.Visibility" Value="Visible" />
|
||||||
|
</VisualState.Setters>
|
||||||
|
</VisualState>
|
||||||
|
</VisualStateGroup>
|
||||||
|
</VisualStateManager.VisualStateGroups>
|
||||||
|
|
||||||
<Border
|
<Border
|
||||||
Name="HighlightBorder"
|
Name="HighlightBorder"
|
||||||
Grid.ColumnSpan="4"
|
Grid.ColumnSpan="4"
|
||||||
@@ -48,10 +69,10 @@
|
|||||||
Content=""
|
Content=""
|
||||||
IsChecked="{x:Bind Checked, Mode=TwoWay}"
|
IsChecked="{x:Bind Checked, Mode=TwoWay}"
|
||||||
IsTabStop="True"
|
IsTabStop="True"
|
||||||
TabIndex="0"
|
|
||||||
Style="{StaticResource CheckBoxDefaultStyleOverride}"
|
Style="{StaticResource CheckBoxDefaultStyleOverride}"
|
||||||
|
TabIndex="0"
|
||||||
XYFocusKeyboardNavigation="Enabled" />
|
XYFocusKeyboardNavigation="Enabled" />
|
||||||
|
|
||||||
<Image
|
<Image
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
Width="16"
|
Width="16"
|
||||||
@@ -82,16 +103,16 @@
|
|||||||
Grid.Column="3"
|
Grid.Column="3"
|
||||||
Width="12"
|
Width="12"
|
||||||
Height="12"
|
Height="12"
|
||||||
CornerRadius="12"
|
|
||||||
Margin="4,0,8,0"
|
Margin="4,0,8,0"
|
||||||
Background="{ThemeResource SystemFillColorCriticalBrush}"
|
Background="{ThemeResource SystemFillColorCriticalBrush}"
|
||||||
|
CornerRadius="12"
|
||||||
Visibility="Collapsed">
|
Visibility="Collapsed">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
Foreground="White"
|
|
||||||
FontSize="8"
|
FontSize="8"
|
||||||
|
Foreground="White"
|
||||||
Text="" />
|
Text="" />
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<TextBlock
|
<TextBlock
|
||||||
@@ -100,26 +121,5 @@
|
|||||||
TextWrapping="Wrap" />
|
TextWrapping="Wrap" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<VisualStateManager.VisualStateGroups>
|
|
||||||
<VisualStateGroup x:Name="CommonStates">
|
|
||||||
<VisualState x:Name="Normal" />
|
|
||||||
<VisualState x:Name="Highlight">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Target="HighlightBorder.Opacity" Value="0.1" />
|
|
||||||
<Setter Target="HighlightBorder.BorderBrush" Value="{ThemeResource AccentTextFillColorPrimaryBrush}" />
|
|
||||||
<Setter Target="HighlightBorder.Background" Value="{ThemeResource AccentTextFillColorPrimaryBrush}" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
<VisualState x:Name="Error">
|
|
||||||
<VisualState.Setters>
|
|
||||||
<Setter Target="HighlightBorder.Opacity" Value="1" />
|
|
||||||
<Setter Target="HighlightBorder.BorderBrush" Value="{ThemeResource SystemFillColorCriticalBackgroundBrush}" />
|
|
||||||
<Setter Target="HighlightBorder.Background" Value="{ThemeResource SystemFillColorCriticalBackgroundBrush}" />
|
|
||||||
<Setter Target="ErrorIcon.Visibility" Value="Visible" />
|
|
||||||
</VisualState.Setters>
|
|
||||||
</VisualState>
|
|
||||||
</VisualStateGroup>
|
|
||||||
</VisualStateManager.VisualStateGroups>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -8,8 +8,10 @@
|
|||||||
xmlns:local="using:PowerRenameUI"
|
xmlns:local="using:PowerRenameUI"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
|
<Window.SystemBackdrop>
|
||||||
<Grid Padding="12" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
<MicaBackdrop />
|
||||||
|
</Window.SystemBackdrop>
|
||||||
|
<Grid Padding="12">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0" />
|
<RowDefinition Height="0" />
|
||||||
<!-- 48 if we need to draw the title bar ourself -->
|
<!-- 48 if we need to draw the title bar ourself -->
|
||||||
@@ -62,7 +64,7 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<TextBlock x:Uid="TxtBlock_Original" FontWeight="Medium" />
|
<TextBlock x:Uid="TxtBlock_Original" FontWeight="Medium" />
|
||||||
<TextBlock FontWeight="Medium" Margin="4,0,0,0" >
|
<TextBlock Margin="4,0,0,0" FontWeight="Medium">
|
||||||
<Run Text="(" /><Run Text="{x:Bind OriginalCount, Mode=OneWay}" /><Run Text=")" />
|
<Run Text="(" /><Run Text="{x:Bind OriginalCount, Mode=OneWay}" /><Run Text=")" />
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
@@ -75,8 +77,8 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<TextBlock x:Uid="TxtBlock_Renamed" FontWeight="Medium" />
|
<TextBlock x:Uid="TxtBlock_Renamed" FontWeight="Medium" />
|
||||||
<TextBlock FontWeight="Medium" Margin="4,0,0,0" >
|
<TextBlock Margin="4,0,0,0" FontWeight="Medium">
|
||||||
<Run Text="(" /><Run Text="{x:Bind RenamedCount, Mode=OneWay}" /><Run Text=")" />
|
<Run Text="(" /><Run Text="{x:Bind RenamedCount, Mode=OneWay}" /><Run Text=")" />
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
@@ -85,9 +87,9 @@
|
|||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Height="32"
|
Height="32"
|
||||||
Margin="0,0,8,0"
|
Margin="0,0,8,0"
|
||||||
BorderThickness="0"
|
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
|
BorderThickness="0"
|
||||||
Content=""
|
Content=""
|
||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}">
|
FontFamily="{ThemeResource SymbolThemeFontFamily}">
|
||||||
<Button.Flyout>
|
<Button.Flyout>
|
||||||
@@ -113,37 +115,37 @@
|
|||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Bottom"
|
VerticalAlignment="Bottom"
|
||||||
Fill="{ThemeResource DividerStrokeColorDefaultBrush}" />
|
Fill="{ThemeResource DividerStrokeColorDefaultBrush}" />
|
||||||
<!--Changing VirtualizationMode to Recycling introduces the issue with popping indent/icons, but makes scrolling slightly faster -->
|
<!-- Changing VirtualizationMode to Recycling introduces the issue with popping indent/icons, but makes scrolling slightly faster -->
|
||||||
<ListView
|
<ListView
|
||||||
|
x:Name="listView_ExplorerItems"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.ColumnSpan="6"
|
Grid.ColumnSpan="6"
|
||||||
IsItemClickEnabled="False"
|
IsItemClickEnabled="False"
|
||||||
IsTabStop="false"
|
IsTabStop="false"
|
||||||
ItemsSource="{x:Bind ExplorerItems, Mode=OneWay}"
|
ItemsSource="{x:Bind ExplorerItems, Mode=OneWay}"
|
||||||
SelectionMode="None"
|
SelectionMode="None"
|
||||||
x:Name="listView_ExplorerItems"
|
VirtualizingStackPanel.VirtualizationMode="Standard"
|
||||||
XYFocusKeyboardNavigation="Enabled"
|
XYFocusKeyboardNavigation="Enabled">
|
||||||
VirtualizingStackPanel.VirtualizationMode="Standard">
|
|
||||||
<ListView.ItemTemplate>
|
<ListView.ItemTemplate>
|
||||||
<DataTemplate x:DataType="local:ExplorerItemViewModel">
|
<DataTemplate x:DataType="local:ExplorerItemViewModel">
|
||||||
<local:ExplorerItem
|
<local:ExplorerItem
|
||||||
|
Checked="{x:Bind CheckedVM, Mode=TwoWay, FallbackValue=True}"
|
||||||
Id="{x:Bind IdVM, Mode=OneWay}"
|
Id="{x:Bind IdVM, Mode=OneWay}"
|
||||||
IdStr="{x:Bind IdStrVM}"
|
IdStr="{x:Bind IdStrVM}"
|
||||||
|
ImagePath="{x:Bind ImagePathVM}"
|
||||||
|
Indentation="{x:Bind IndentationVM}"
|
||||||
Original="{x:Bind OriginalVM}"
|
Original="{x:Bind OriginalVM}"
|
||||||
Renamed="{x:Bind RenamedVM}"
|
Renamed="{x:Bind RenamedVM}"
|
||||||
Indentation="{x:Bind IndentationVM}"
|
State="{x:Bind StateVM}"
|
||||||
ImagePath="{x:Bind ImagePathVM}"
|
Type="{x:Bind TypeVM}" />
|
||||||
Type="{x:Bind TypeVM}"
|
</DataTemplate>
|
||||||
Checked="{x:Bind CheckedVM, Mode=TwoWay, FallbackValue=True}"
|
|
||||||
State="{x:Bind StateVM}" />
|
|
||||||
</DataTemplate >
|
|
||||||
</ListView.ItemTemplate>
|
</ListView.ItemTemplate>
|
||||||
<ListView.ItemsPanel>
|
<ListView.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<VirtualizingStackPanel />
|
<VirtualizingStackPanel />
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ListView.ItemsPanel>
|
</ListView.ItemsPanel>
|
||||||
|
|
||||||
<ListView.ItemContainerStyle>
|
<ListView.ItemContainerStyle>
|
||||||
<Style TargetType="ListViewItem">
|
<Style TargetType="ListViewItem">
|
||||||
<Setter Property="IsTabStop" Value="False" />
|
<Setter Property="IsTabStop" Value="False" />
|
||||||
@@ -372,7 +374,7 @@
|
|||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="ApplyToLabel"
|
x:Name="ApplyToLabel"
|
||||||
x:Uid="TextBox_ApplyTo"
|
x:Uid="TextBox_ApplyTo"
|
||||||
Margin="0,12,0,8"
|
Margin="0,16,0,8"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
||||||
|
|
||||||
@@ -397,36 +399,32 @@
|
|||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="toggleButton_includeFiles"
|
x:Name="toggleButton_includeFiles"
|
||||||
x:Uid="ToggleButton_IncludeFiles"
|
x:Uid="ToggleButton_IncludeFiles"
|
||||||
Height="31"
|
Height="32"
|
||||||
MinHeight="0"
|
MinHeight="0"
|
||||||
Content=""
|
Content=""
|
||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
IsChecked="True"
|
IsChecked="True" />
|
||||||
Style="{StaticResource CustomToggleButtonStyle}" />
|
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="toggleButton_includeFolders"
|
x:Name="toggleButton_includeFolders"
|
||||||
x:Uid="ToggleButton_IncludeFolders"
|
x:Uid="ToggleButton_IncludeFolders"
|
||||||
Height="31"
|
Height="32"
|
||||||
MinHeight="0"
|
MinHeight="0"
|
||||||
Content=""
|
Content=""
|
||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
IsChecked="True"
|
IsChecked="True" />
|
||||||
Style="{StaticResource CustomToggleButtonStyle}" />
|
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="toggleButton_includeSubfolders"
|
x:Name="toggleButton_includeSubfolders"
|
||||||
x:Uid="ToggleButton_IncludeSubFolders"
|
x:Uid="ToggleButton_IncludeSubFolders"
|
||||||
Height="31"
|
Height="32"
|
||||||
MinHeight="0"
|
MinHeight="0"
|
||||||
Content=""
|
Content=""
|
||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
IsChecked="True"
|
IsChecked="True" />
|
||||||
Style="{StaticResource CustomToggleButtonStyle}" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Uid="TextBlock_TextFormatting"
|
x:Uid="TextBlock_TextFormatting"
|
||||||
Margin="0,12,0,8"
|
Margin="0,16,0,8"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
||||||
|
|
||||||
@@ -435,48 +433,42 @@
|
|||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="toggleButton_lowerCase"
|
x:Name="toggleButton_lowerCase"
|
||||||
x:Uid="ToggleButton_Lowercase"
|
x:Uid="ToggleButton_Lowercase"
|
||||||
Height="31"
|
Height="32"
|
||||||
MinHeight="0"
|
MinHeight="0"
|
||||||
Content="aa"
|
Content="aa"
|
||||||
FontWeight="Medium"
|
FontWeight="Medium" />
|
||||||
Style="{StaticResource CustomToggleButtonStyle}" />
|
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="toggleButton_upperCase"
|
x:Name="toggleButton_upperCase"
|
||||||
x:Uid="ToggleButton_Uppercase"
|
x:Uid="ToggleButton_Uppercase"
|
||||||
Height="31"
|
Height="32"
|
||||||
MinHeight="0"
|
MinHeight="0"
|
||||||
Content="AA"
|
Content="AA"
|
||||||
FontWeight="Medium"
|
FontWeight="Medium" />
|
||||||
Style="{StaticResource CustomToggleButtonStyle}" />
|
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="toggleButton_titleCase"
|
x:Name="toggleButton_titleCase"
|
||||||
x:Uid="ToggleButton_TitleCase"
|
x:Uid="ToggleButton_TitleCase"
|
||||||
Height="31"
|
Height="32"
|
||||||
MinHeight="0"
|
MinHeight="0"
|
||||||
Content="Aa"
|
Content="Aa"
|
||||||
FontWeight="Medium"
|
FontWeight="Medium" />
|
||||||
Style="{StaticResource CustomToggleButtonStyle}" />
|
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="toggleButton_capitalize"
|
x:Name="toggleButton_capitalize"
|
||||||
x:Uid="ToggleButton_Capitalize"
|
x:Uid="ToggleButton_Capitalize"
|
||||||
Height="31"
|
Height="32"
|
||||||
MinHeight="0"
|
MinHeight="0"
|
||||||
Content="Aa Aa"
|
Content="Aa Aa"
|
||||||
FontWeight="Medium"
|
FontWeight="Medium" />
|
||||||
Style="{StaticResource CustomToggleButtonStyle}" />
|
|
||||||
<AppBarSeparator Margin="5,0,5,0" />
|
<AppBarSeparator Margin="5,0,5,0" />
|
||||||
|
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="toggleButton_enumItems"
|
x:Name="toggleButton_enumItems"
|
||||||
x:Uid="ToggleButton_EnumItems"
|
x:Uid="ToggleButton_EnumItems"
|
||||||
MinHeight="32"
|
Height="32"
|
||||||
Content=""
|
Content=""
|
||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
FontFamily="{ThemeResource SymbolThemeFontFamily}" />
|
||||||
Style="{StaticResource CustomToggleButtonStyle}" />
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|
||||||
<Rectangle
|
<Rectangle
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Height="1"
|
Height="1"
|
||||||
@@ -484,9 +476,6 @@
|
|||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Fill="{ThemeResource CardStrokeColorDefaultBrush}" />
|
Fill="{ThemeResource CardStrokeColorDefaultBrush}" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<StackPanel
|
<StackPanel
|
||||||
@@ -534,7 +523,6 @@
|
|||||||
Content=""
|
Content=""
|
||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}" />
|
FontFamily="{ThemeResource SymbolThemeFontFamily}" />
|
||||||
|
|
||||||
|
|
||||||
<!--<Button Content=""
|
<!--<Button Content=""
|
||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
ToolTipService.ToolTip="Presets"
|
ToolTipService.ToolTip="Presets"
|
||||||
@@ -552,11 +540,8 @@
|
|||||||
</MenuFlyout>
|
</MenuFlyout>
|
||||||
</Button.Flyout>
|
</Button.Flyout>
|
||||||
</Button>-->
|
</Button>-->
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<SplitButton
|
<SplitButton
|
||||||
x:Name="button_rename"
|
x:Name="button_rename"
|
||||||
x:Uid="ButtonApply"
|
x:Uid="ButtonApply"
|
||||||
@@ -587,10 +572,5 @@
|
|||||||
</MenuFlyout>
|
</MenuFlyout>
|
||||||
</SplitButton.Flyout>
|
</SplitButton.Flyout>
|
||||||
</SplitButton>
|
</SplitButton>
|
||||||
|
|
||||||
<!--<StackPanel x:Name="TitleBar" Orientation="Horizontal">
|
|
||||||
<Image Source="Assets/PowerRename.png" Width="16" Height="16" VerticalAlignment="Top" Margin="20,9,0,0"/>
|
|
||||||
<TextBlock Text="PowerRename" Style="{StaticResource CaptionTextBlockStyle}" Margin="18,8,8,0" VerticalAlignment="Top" />
|
|
||||||
</StackPanel>-->
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
Reference in New Issue
Block a user