mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
[FLS] Icon and UI fixes (#21732)
* Fixes * Additional fixes * Uncomment TextBlock that's needed * Remove ItemsPanelTemplate that was turning off virtualization
This commit is contained in:
@@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
|
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="2.0.0" />
|
||||||
<PackageReference Include="CommunityToolkit.Labs.WinUI.SettingsControls" Version="0.0.2" />
|
<PackageReference Include="CommunityToolkit.Labs.WinUI.SettingsControls" Version="0.0.7" />
|
||||||
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.0.0" />
|
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.0.0" />
|
||||||
<PackageReference Include="CommunityToolkit.WinUI.UI" Version="7.1.2" />
|
<PackageReference Include="CommunityToolkit.WinUI.UI" Version="7.1.2" />
|
||||||
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.1.5" />
|
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.1.5" />
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
|
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
|
||||||
xmlns:interop="using:FileLocksmith.Interop"
|
xmlns:interop="using:FileLocksmith.Interop"
|
||||||
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
|
xmlns:labs="using:CommunityToolkit.Labs.WinUI"
|
||||||
xmlns:local="using:PowerToys.FileLocksmithUI.Views"
|
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:toolkitConverters="using:CommunityToolkit.WinUI.UI.Converters"
|
xmlns:toolkitConverters="using:CommunityToolkit.WinUI.UI.Converters"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
@@ -41,20 +40,25 @@
|
|||||||
<RowDefinition Height="*" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Grid Padding="18,0,18,4" VerticalAlignment="Bottom">
|
<Grid
|
||||||
<!--<TextBlock Margin="0,2,0,0" Text="Current proccesses:" Style="{ThemeResource BodyStrongTextBlockStyle}"/>-->
|
Padding="18,0,18,4"
|
||||||
<Button Content="{x:Bind ViewModel.Paths, Converter={StaticResource fileListToDescriptionConverter}}" Click="ShowSelectedPathsButton_Click">
|
VerticalAlignment="Bottom">
|
||||||
|
<Button
|
||||||
|
Click="ShowSelectedPathsButton_Click"
|
||||||
|
Content="{x:Bind ViewModel.Paths, Converter={StaticResource fileListToDescriptionConverter}}">
|
||||||
<Button.Template>
|
<Button.Template>
|
||||||
<ControlTemplate TargetType="Button">
|
<ControlTemplate TargetType="Button">
|
||||||
<TextBlock Margin="0,8,0,0"
|
<TextBlock
|
||||||
|
Margin="0,8,0,0"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
Style="{ThemeResource BodyStrongTextBlockStyle}"
|
Style="{ThemeResource BodyStrongTextBlockStyle}"
|
||||||
Text="{TemplateBinding Content}" >
|
Text="{TemplateBinding Content}" />
|
||||||
</TextBlock>
|
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Button.Template>
|
</Button.Template>
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<TextBlock x:Uid="PathsTooltipDescription" TextWrapping="WrapWholeWords"/>
|
<TextBlock
|
||||||
|
x:Uid="PathsTooltipDescription"
|
||||||
|
TextWrapping="WrapWholeWords" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@@ -71,7 +75,7 @@
|
|||||||
<FontIcon
|
<FontIcon
|
||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
FontSize="16"
|
FontSize="16"
|
||||||
Glyph="" />
|
Glyph="" />
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<TextBlock x:Uid="Reload" />
|
<TextBlock x:Uid="Reload" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
@@ -85,7 +89,7 @@
|
|||||||
<FontIcon
|
<FontIcon
|
||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
FontSize="16"
|
FontSize="16"
|
||||||
Glyph="" />
|
Glyph="" />
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<TextBlock x:Uid="RestartAsAdmin" />
|
<TextBlock x:Uid="RestartAsAdmin" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
@@ -98,87 +102,101 @@
|
|||||||
<ListView
|
<ListView
|
||||||
x:Name="ProcessesListView"
|
x:Name="ProcessesListView"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
ItemsSource="{x:Bind ViewModel.Processes}"
|
|
||||||
IncrementalLoadingThreshold="10"
|
IncrementalLoadingThreshold="10"
|
||||||
|
ItemsSource="{x:Bind ViewModel.Processes}"
|
||||||
SelectionMode="None">
|
SelectionMode="None">
|
||||||
<ListView.ItemTemplate>
|
<ListView.ItemTemplate>
|
||||||
<DataTemplate x:DataType="interop:ProcessResult">
|
<DataTemplate x:DataType="interop:ProcessResult">
|
||||||
<labs:SettingsExpander Margin="0,3,0,0">
|
<labs:SettingsExpander Margin="0,3,0,0">
|
||||||
<labs:SettingsExpander.Header>
|
<labs:SettingsExpander.Resources>
|
||||||
<!-- We can't use the HeaderIcon because it only support a BitmapIcon, which only supports UriSource - not a direct BitmapImage -->
|
<x:Double x:Key="SettingsCardWrapThreshold">0</x:Double>
|
||||||
<StackPanel Orientation="Horizontal">
|
</labs:SettingsExpander.Resources>
|
||||||
<Image
|
<labs:SettingsExpander.Header>
|
||||||
Width="16"
|
<!-- We can't use the HeaderIcon because it only support a BitmapIcon, which only supports UriSource - not a direct BitmapImage -->
|
||||||
Height="16"
|
|
||||||
Margin="2,0,24,0"
|
|
||||||
Source="{x:Bind pid, Converter={StaticResource pidToIconConverter}}" />
|
|
||||||
<TextBlock IsTextSelectionEnabled="True" Text="{x:Bind name}" />
|
|
||||||
</StackPanel>
|
|
||||||
</labs:SettingsExpander.Header>
|
|
||||||
<labs:SettingsExpander.Content>
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
|
<Image
|
||||||
|
Width="16"
|
||||||
|
Height="16"
|
||||||
|
Margin="2,0,24,0"
|
||||||
|
Source="{x:Bind pid, Converter={StaticResource pidToIconConverter}}" />
|
||||||
|
<TextBlock
|
||||||
|
IsTextSelectionEnabled="True"
|
||||||
|
Text="{x:Bind name}" />
|
||||||
|
</StackPanel>
|
||||||
|
</labs:SettingsExpander.Header>
|
||||||
|
<labs:SettingsExpander.Content>
|
||||||
|
<StackPanel
|
||||||
|
Orientation="Horizontal"
|
||||||
|
Spacing="8">
|
||||||
<FontIcon
|
<FontIcon
|
||||||
Margin="0,0,8,0"
|
|
||||||
Glyph=""
|
|
||||||
Foreground="{ThemeResource InfoBarWarningSeverityIconBackground}"
|
Foreground="{ThemeResource InfoBarWarningSeverityIconBackground}"
|
||||||
Visibility="{x:Bind user, Mode=OneTime, Converter={StaticResource userToSystemWarningVisibilityConverter}}"
|
Glyph=""
|
||||||
>
|
Visibility="{x:Bind user, Mode=OneTime, Converter={StaticResource userToSystemWarningVisibilityConverter}}">
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<TextBlock TextWrapping="Wrap" x:Uid="ProcessIsSystemUserWarning" />
|
<TextBlock
|
||||||
|
x:Uid="ProcessIsSystemUserWarning"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
</FontIcon>
|
</FontIcon>
|
||||||
<Button Command="{Binding Path=DataContext.EndTaskCommand, ElementName=ProcessesListView}" CommandParameter="{Binding}">
|
<Button
|
||||||
<StackPanel Orientation="Horizontal" Spacing="6">
|
MinWidth="132"
|
||||||
|
Command="{Binding Path=DataContext.EndTaskCommand, ElementName=ProcessesListView}"
|
||||||
|
CommandParameter="{Binding}">
|
||||||
|
<StackPanel
|
||||||
|
Orientation="Horizontal"
|
||||||
|
Spacing="6">
|
||||||
<FontIcon
|
<FontIcon
|
||||||
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
Glyph="" />
|
Glyph="" />
|
||||||
<TextBlock x:Uid="EndTask" />
|
<TextBlock
|
||||||
|
x:Uid="EndTask"
|
||||||
|
FontSize="14" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</labs:SettingsExpander.Content>
|
</labs:SettingsExpander.Content>
|
||||||
<labs:SettingsExpander.Items>
|
<labs:SettingsExpander.Items>
|
||||||
<labs:SettingsCard x:Uid="ProcessID">
|
<labs:SettingsCard x:Uid="ProcessID">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
IsTextSelectionEnabled="True"
|
IsTextSelectionEnabled="True"
|
||||||
Text="{x:Bind pid}" />
|
Text="{x:Bind pid}" />
|
||||||
</labs:SettingsCard>
|
</labs:SettingsCard>
|
||||||
<labs:SettingsCard x:Uid="User">
|
<labs:SettingsCard x:Uid="User">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
IsTextSelectionEnabled="True"
|
IsTextSelectionEnabled="True"
|
||||||
Text="{x:Bind user}" />
|
Text="{x:Bind user}" />
|
||||||
</labs:SettingsCard>
|
</labs:SettingsCard>
|
||||||
<labs:SettingsCard ContentAlignment="Vertical">
|
<labs:SettingsCard ContentAlignment="Vertical">
|
||||||
<labs:SettingsCard.Header>
|
<labs:SettingsCard.Header>
|
||||||
<TextBlock>
|
<TextBlock>
|
||||||
<Run x:Uid="Files" />
|
<Run x:Uid="Files" />
|
||||||
<Run Text="(" /><Run Text="{x:Bind files, Converter={StaticResource fileCountConverter}}" /><Run Text=")" />
|
<Run Text="(" /><Run Text="{x:Bind files, Converter={StaticResource fileCountConverter}}" /><Run Text=")" />
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</labs:SettingsCard.Header>
|
</labs:SettingsCard.Header>
|
||||||
<ListView
|
<ItemsRepeater
|
||||||
Margin="-16,0,0,0"
|
Margin="-16,0,0,0"
|
||||||
ItemsSource="{x:Bind files}"
|
ItemsSource="{x:Bind files}">
|
||||||
SelectionMode="None">
|
<ItemsRepeater.ItemTemplate>
|
||||||
<ListView.ItemTemplate>
|
<DataTemplate x:DataType="x:String">
|
||||||
<DataTemplate x:DataType="x:String">
|
<TextBlock
|
||||||
<TextBlock
|
Margin="16,0,0,4"
|
||||||
FontSize="12"
|
FontSize="12"
|
||||||
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
|
||||||
IsTextSelectionEnabled="True"
|
IsTextSelectionEnabled="True"
|
||||||
Style="{StaticResource CaptionTextBlockStyle}"
|
Style="{StaticResource CaptionTextBlockStyle}"
|
||||||
Text="{Binding}"
|
Text="{Binding}"
|
||||||
TextTrimming="CharacterEllipsis"
|
TextTrimming="CharacterEllipsis"
|
||||||
TextWrapping="NoWrap"
|
TextWrapping="NoWrap"
|
||||||
ToolTipService.ToolTip="{Binding}" />
|
ToolTipService.ToolTip="{Binding}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListView.ItemTemplate>
|
</ItemsRepeater.ItemTemplate>
|
||||||
</ListView>
|
</ItemsRepeater>
|
||||||
</labs:SettingsCard>
|
</labs:SettingsCard>
|
||||||
</labs:SettingsExpander.Items>
|
</labs:SettingsExpander.Items>
|
||||||
</labs:SettingsExpander>
|
</labs:SettingsExpander>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListView.ItemTemplate>
|
</ListView.ItemTemplate>
|
||||||
</ListView>
|
</ListView>
|
||||||
@@ -188,17 +206,23 @@
|
|||||||
Orientation="Vertical"
|
Orientation="Vertical"
|
||||||
Spacing="8"
|
Spacing="8"
|
||||||
Visibility="{x:Bind ViewModel.Processes.Count, Mode=OneWay, Converter={StaticResource doubleToVisibilityConverter}}">
|
Visibility="{x:Bind ViewModel.Processes.Count, Mode=OneWay, Converter={StaticResource doubleToVisibilityConverter}}">
|
||||||
<Button HorizontalAlignment="Center" Command="{Binding LoadProcessesCommand}" >
|
<Button
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Command="{Binding LoadProcessesCommand}">
|
||||||
<Button.Template>
|
<Button.Template>
|
||||||
<ControlTemplate TargetType="Button">
|
<ControlTemplate TargetType="Button">
|
||||||
<FontIcon FontSize="32" Glyph="" />
|
<FontIcon
|
||||||
|
FontSize="32"
|
||||||
|
Glyph="" />
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Button.Template>
|
</Button.Template>
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<TextBlock x:Uid="Reload" />
|
<TextBlock x:Uid="Reload" />
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
</Button>
|
</Button>
|
||||||
<TextBlock x:Uid="EmptyListDescription" Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
<TextBlock
|
||||||
|
x:Uid="EmptyListDescription"
|
||||||
|
Foreground="{ThemeResource TextFillColorSecondaryBrush}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
<ProgressRing
|
<ProgressRing
|
||||||
@@ -208,10 +232,15 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
<ContentDialog
|
<ContentDialog
|
||||||
x:Name="SelectedFilesListDialog"
|
x:Name="SelectedFilesListDialog"
|
||||||
x:Uid="SelectedFilesListDialog"
|
x:Uid="SelectedFilesListDialog">
|
||||||
>
|
<ScrollViewer
|
||||||
<ScrollViewer HorizontalScrollBarVisibility="Auto" HorizontalScrollMode="Auto" VerticalScrollBarVisibility="Auto" VerticalScrollMode="Auto">
|
HorizontalScrollBarVisibility="Auto"
|
||||||
<TextBlock IsTextSelectionEnabled="True" Text="{x:Bind ViewModel.PathsToString, Mode=OneWay}"/>
|
HorizontalScrollMode="Auto"
|
||||||
|
VerticalScrollBarVisibility="Auto"
|
||||||
|
VerticalScrollMode="Auto">
|
||||||
|
<TextBlock
|
||||||
|
IsTextSelectionEnabled="True"
|
||||||
|
Text="{x:Bind ViewModel.PathsToString, Mode=OneWay}" />
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</ContentDialog>
|
</ContentDialog>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
Reference in New Issue
Block a user