Files
QuickLook/QuickLook.Plugin/QuickLook.Plugin.AppViewer/InfoPanels/RpmInfoPanel.xaml
2025-06-22 04:12:46 +08:00

266 lines
12 KiB
XML

<UserControl x:Class="QuickLook.Plugin.AppViewer.InfoPanels.RpmInfoPanel"
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:QuickLook.Plugin.AppViewer"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
FontSize="14"
UseLayoutRounding="True"
mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="GroupBox.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="15" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border x:Name="imageBk"
Grid.Row="1"
Grid.Column="0"
Width="124"
Height="124"
VerticalAlignment="Top"
CornerRadius="8">
<Image x:Name="image"
Width="120"
Height="120"
Opacity="0"
RenderOptions.BitmapScalingMode="HighQuality"
SnapsToDevicePixels="True"
Stretch="Fill"
UseLayoutRounding="True">
<Image.Style>
<Style TargetType="{x:Type Image}">
<Style.Triggers>
<DataTrigger Binding="{Binding Source, ElementName=image}" Value="{x:Null}">
<DataTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation BeginTime="0:0:0"
Storyboard.TargetProperty="Opacity"
From="0"
To="1"
Duration="0:0:0.05" />
</Storyboard>
</BeginStoryboard>
</DataTrigger.ExitActions>
</DataTrigger>
</Style.Triggers>
</Style>
</Image.Style>
</Image>
</Border>
<Grid Grid.Row="1" Grid.Column="1">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="10" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="10" />
<RowDefinition Height="Auto" />
<RowDefinition Height="10" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Grid.Row="1"
Grid.Column="1"
Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0"
MaxHeight="60"
Padding="3"
FontSize="19"
FontWeight="SemiBold"
LineHeight="25"
TextTrimming="CharacterEllipsis"
TextWrapping="Wrap">
<TextBlock.Inlines>
<Run x:Name="filename" Text="FilenameFilenameFilenameFilenameFilenameFilenameFilenameFilenameFilenameFilename.ext" />
</TextBlock.Inlines>
</TextBlock>
</Grid>
<!-- Application Name -->
<TextBlock x:Name="applicationNameTitle"
Grid.Row="3"
Grid.Column="1"
Padding="3"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Text="Application Name" />
<TextBlock x:Name="applicationName"
Grid.Row="3"
Grid.Column="2"
Margin="8,0,0,0"
Padding="3"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Text="Searching..."
TextTrimming="CharacterEllipsis"
TextWrapping="Wrap" />
<!-- Version -->
<TextBlock x:Name="versionTitle"
Grid.Row="4"
Grid.Column="1"
Padding="3"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Text="Version" />
<TextBlock x:Name="version"
Grid.Row="4"
Grid.Column="2"
Margin="8,0,0,0"
Padding="3"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Text="Searching..."
TextTrimming="CharacterEllipsis"
TextWrapping="Wrap" />
<!-- Architecture -->
<TextBlock x:Name="architectureTitle"
Grid.Row="5"
Grid.Column="1"
Padding="3"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Text="Architecture" />
<TextBlock x:Name="architectureName"
Grid.Row="5"
Grid.Column="2"
Margin="8,0,0,0"
Padding="3"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Text="Searching..."
TextTrimming="CharacterEllipsis"
TextWrapping="Wrap" />
<!-- Vendor -->
<TextBlock x:Name="vendorTitle"
Grid.Row="6"
Grid.Column="1"
Padding="3"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Text="Vendor" />
<TextBlock x:Name="vendor"
Grid.Row="6"
Grid.Column="2"
Margin="8,0,0,0"
Padding="3"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Text="Searching..."
TextTrimming="CharacterEllipsis"
TextWrapping="Wrap" />
<!-- Type -->
<TextBlock x:Name="typeTitle"
Grid.Row="7"
Grid.Column="1"
Padding="3"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Text="Type"
Visibility="Collapsed" />
<TextBlock x:Name="type"
Grid.Row="7"
Grid.Column="2"
Margin="8,0,0,0"
Padding="3"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Text="Searching..."
TextTrimming="CharacterEllipsis"
TextWrapping="Wrap"
Visibility="Collapsed" />
<!-- Terminal -->
<TextBlock x:Name="terminalTitle"
Grid.Row="8"
Grid.Column="1"
Padding="3"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Text="Terminal"
Visibility="Collapsed" />
<TextBlock x:Name="terminal"
Grid.Row="8"
Grid.Column="2"
Margin="8,0,0,0"
Padding="3"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Text="Searching..."
TextTrimming="CharacterEllipsis"
TextWrapping="Wrap"
Visibility="Collapsed" />
<!-- Total Size -->
<TextBlock x:Name="totalSizeTitle"
Grid.Row="9"
Grid.Column="1"
Padding="3"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Text="Total Size" />
<TextBlock x:Name="totalSize"
Grid.Row="9"
Grid.Column="2"
Margin="8,0,0,0"
Padding="3"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Text="Calculating size..." />
<!-- Last Modified -->
<TextBlock x:Name="modDateTitle"
Grid.Row="10"
Grid.Column="1"
Padding="3"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Text="Last Modified" />
<TextBlock x:Name="modDate"
Grid.Row="10"
Grid.Column="2"
Margin="8,0,0,0"
Padding="3"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Text="Searching..."
TextTrimming="CharacterEllipsis" />
<!-- Environment -->
<GroupBox x:Name="environmentGroupBox"
Grid.Row="11"
Grid.Column="1"
Grid.ColumnSpan="2"
Margin="3,3,16,16"
Padding="3"
Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Header="Environment"
Visibility="Collapsed">
<ScrollViewer VerticalScrollBarVisibility="Auto" Visibility="Collapsed">
<ScrollViewer.Resources>
<Style TargetType="{x:Type TextBox}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource TextFillColorPrimaryBrush}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="BorderBrush" Value="Transparent" />
</Style>
</ScrollViewer.Resources>
<ItemsControl x:Name="permissions">
<ItemsControl.ItemTemplate>
<DataTemplate>
<TextBox Margin="8,3,16,3"
IsReadOnly="True"
Text="{Binding ., Mode=OneTime}" />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</GroupBox>
</Grid>
</Grid>
</UserControl>