改了两ui 适配了触摸
This commit is contained in:
@@ -9,120 +9,12 @@
|
||||
mc:Ignorable="d"
|
||||
ui:WindowHelper.UseModernWindowStyle="False"
|
||||
ui:WindowHelper.SystemBackdropType="Mica"
|
||||
Title="历史版本回滚" Height="650" Width="900" ResizeMode="NoResize"
|
||||
WindowStartupLocation="CenterScreen" WindowStyle="None"
|
||||
Background="Transparent" MinHeight="550" MinWidth="800">
|
||||
<Window.Template>
|
||||
<ControlTemplate TargetType="Window">
|
||||
<Border Background="{DynamicResource SettingsPageBackground}"
|
||||
CornerRadius="8"
|
||||
BorderBrush="{DynamicResource SettingsPageBorderBrush}"
|
||||
BorderThickness="1">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Color="#000000" BlurRadius="20" ShadowDepth="0" Opacity="0.1"/>
|
||||
</Border.Effect>
|
||||
<AdornerDecorator>
|
||||
<Grid>
|
||||
<!-- 标题栏 -->
|
||||
<Border Background="{DynamicResource SettingsPageBackground}" Height="48" VerticalAlignment="Top">
|
||||
<Grid>
|
||||
<TextBlock Text="{TemplateBinding Title}"
|
||||
FontSize="14" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource SettingsPageForeground}"
|
||||
VerticalAlignment="Center"
|
||||
Margin="16,0,0,0"/>
|
||||
<!-- 最小化按钮 -->
|
||||
<Button Name="MinimizeButton"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Margin="0,8,40,0"
|
||||
Width="32" Height="32"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Click="MinimizeButton_Click"
|
||||
Cursor="Hand"
|
||||
ToolTip="最小化">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
CornerRadius="4"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}">
|
||||
<TextBlock Text="−" FontSize="14"
|
||||
Foreground="{DynamicResource SettingsPageForeground}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="#FF2563eb" Opacity="0.1"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="#FF2563eb" Opacity="0.2"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
</Button>
|
||||
|
||||
<!-- 关闭按钮 -->
|
||||
<Button Name="CloseButton"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
Margin="0,8,8,0"
|
||||
Width="32" Height="32"
|
||||
Background="Transparent"
|
||||
BorderThickness="0"
|
||||
Click="CloseButton_Click"
|
||||
Cursor="Hand"
|
||||
ToolTip="关闭">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Border Background="{TemplateBinding Background}"
|
||||
CornerRadius="4"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}">
|
||||
<TextBlock Text="×" FontSize="14"
|
||||
Foreground="{DynamicResource SettingsPageForeground}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="#ef4444" Opacity="0.1"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush Color="#ef4444" Opacity="0.2"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
<!-- 内容区域 -->
|
||||
<ContentPresenter Margin="0,48,0,0"/>
|
||||
</Grid>
|
||||
</AdornerDecorator>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Window.Template>
|
||||
Title="历史版本回滚" Height="650" Width="900" ResizeMode="CanResize"
|
||||
WindowStartupLocation="CenterScreen" WindowStyle="SingleBorderWindow"
|
||||
Background="{DynamicResource SettingsPageBackground}" MinHeight="550" MinWidth="800"
|
||||
SnapsToDevicePixels="True"
|
||||
TextOptions.TextRenderingMode="ClearType"
|
||||
TextOptions.TextFormattingMode="Display">
|
||||
<Window.Resources>
|
||||
<!-- 主题相关颜色资源 -->
|
||||
<SolidColorBrush x:Key="PrimaryBrush" Color="#FF2563eb"/>
|
||||
@@ -130,111 +22,125 @@
|
||||
<SolidColorBrush x:Key="TextSecondaryBrush" Color="#FF6b7280"/>
|
||||
</Window.Resources>
|
||||
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<Grid Background="Transparent">
|
||||
<!-- 主内容区域 -->
|
||||
<ikw:SimpleStackPanel VerticalAlignment="Stretch" Spacing="0" Margin="20">
|
||||
<!-- 标题区域 -->
|
||||
<ikw:SimpleStackPanel Orientation="Horizontal" Spacing="12" Margin="0,0,0,16">
|
||||
<Border Background="{DynamicResource PrimaryBrush}" CornerRadius="16" Padding="12" Margin="0,0,0,0">
|
||||
<ui:SymbolIcon Symbol="Undo" FontSize="20" Foreground="White"
|
||||
VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
<ikw:SimpleStackPanel VerticalAlignment="Center" Spacing="4">
|
||||
<TextBlock Text="历史版本回滚" FontSize="22" FontWeight="Bold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"/>
|
||||
<TextBlock Text="选择要回滚到的历史版本" FontSize="14"
|
||||
Foreground="{DynamicResource TextSecondaryBrush}"/>
|
||||
</ikw:SimpleStackPanel>
|
||||
</ikw:SimpleStackPanel>
|
||||
|
||||
<!-- 版本选择卡片 -->
|
||||
<Border Background="{DynamicResource SettingsPageBackground}"
|
||||
BorderBrush="{DynamicResource SettingsPageBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="12"
|
||||
Margin="0,0,0,16"
|
||||
Padding="20">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Color="#000000" BlurRadius="8" ShadowDepth="0" Opacity="0.05"/>
|
||||
</Border.Effect>
|
||||
<ikw:SimpleStackPanel Spacing="16">
|
||||
<TextBlock Text="选择版本" FontSize="16" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"/>
|
||||
<ComboBox x:Name="VersionComboBox"
|
||||
Width="300" Height="40"
|
||||
DisplayMemberPath="Version"
|
||||
SelectionChanged="VersionComboBox_SelectionChanged"/>
|
||||
</ikw:SimpleStackPanel>
|
||||
<Grid Background="Transparent" Margin="20">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- 标题区域 -->
|
||||
<ikw:SimpleStackPanel Grid.Row="0" Orientation="Horizontal" Spacing="12" Margin="0,0,0,16">
|
||||
<Border Background="{DynamicResource PrimaryBrush}" CornerRadius="16" Padding="12" Margin="0,0,0,0">
|
||||
<ui:SymbolIcon Symbol="Undo" FontSize="20" Foreground="White"
|
||||
VerticalAlignment="Center"/>
|
||||
</Border>
|
||||
|
||||
<!-- 发布说明卡片 -->
|
||||
<Border Background="{DynamicResource SettingsPageBackground}"
|
||||
BorderBrush="{DynamicResource SettingsPageBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="12"
|
||||
Margin="0,0,0,16"
|
||||
Padding="20">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Color="#000000" BlurRadius="8" ShadowDepth="0" Opacity="0.05"/>
|
||||
</Border.Effect>
|
||||
<ikw:SimpleStackPanel Spacing="16">
|
||||
<TextBlock Text="版本更新说明" FontSize="16" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"/>
|
||||
<Border Background="{DynamicResource SettingsPageBackground}"
|
||||
BorderBrush="{DynamicResource SettingsPageBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="8"
|
||||
MinHeight="150" MaxHeight="250">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Color="#000000" BlurRadius="4" ShadowDepth="0" Opacity="0.03"/>
|
||||
</Border.Effect>
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto"
|
||||
HorizontalScrollBarVisibility="Disabled"
|
||||
Padding="16">
|
||||
<mdxam:MarkdownScrollViewer x:Name="ReleaseNotesViewer"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
MarkdownStyleName="GithubLike"/>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
<ikw:SimpleStackPanel VerticalAlignment="Center" Spacing="4">
|
||||
<TextBlock Text="选择要回滚到的历史版本" FontSize="22" FontWeight="Bold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"/>
|
||||
</ikw:SimpleStackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- 操作按钮区域 -->
|
||||
<ikw:SimpleStackPanel Spacing="16" Margin="0,0,0,16">
|
||||
<Button x:Name="RollbackButton"
|
||||
Content="回滚到此版本"
|
||||
HorizontalAlignment="Center"
|
||||
Click="RollbackButton_Click"
|
||||
Style="{DynamicResource AccentButtonStyle}"
|
||||
Width="200" Height="48"
|
||||
FontSize="16" FontWeight="SemiBold"/>
|
||||
|
||||
<!-- 下载进度面板 -->
|
||||
<Border x:Name="DownloadProgressPanel"
|
||||
Background="{DynamicResource SettingsPageBackground}"
|
||||
BorderBrush="{DynamicResource SettingsPageBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="12"
|
||||
Visibility="Collapsed"
|
||||
Margin="0,8,0,0"
|
||||
Padding="24">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Color="#000000" BlurRadius="8" ShadowDepth="0" Opacity="0.05"/>
|
||||
</Border.Effect>
|
||||
<ikw:SimpleStackPanel Spacing="12">
|
||||
<ProgressBar x:Name="DownloadProgressBar"
|
||||
Width="300" Height="8"
|
||||
Minimum="0" Maximum="100" Value="0"/>
|
||||
<TextBlock x:Name="DownloadProgressText"
|
||||
Text="正在下载..."
|
||||
FontSize="14"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
HorizontalAlignment="Center"/>
|
||||
</ikw:SimpleStackPanel>
|
||||
</Border>
|
||||
</ikw:SimpleStackPanel>
|
||||
</ikw:SimpleStackPanel>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
<!-- 版本选择卡片 -->
|
||||
<Border Grid.Row="1"
|
||||
Background="{DynamicResource SettingsPageBackground}"
|
||||
BorderBrush="{DynamicResource SettingsPageBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="12"
|
||||
Margin="0,0,0,16"
|
||||
Padding="20">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Color="#000000" BlurRadius="8" ShadowDepth="0" Opacity="0.05"/>
|
||||
</Border.Effect>
|
||||
<ikw:SimpleStackPanel Spacing="16">
|
||||
<TextBlock Text="选择版本" FontSize="16" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"/>
|
||||
<ComboBox x:Name="VersionComboBox"
|
||||
Width="300" Height="40"
|
||||
DisplayMemberPath="Version"
|
||||
SelectionChanged="VersionComboBox_SelectionChanged"/>
|
||||
</ikw:SimpleStackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- 发布说明卡片 -->
|
||||
<Border Grid.Row="2"
|
||||
Background="{DynamicResource SettingsPageBackground}"
|
||||
BorderBrush="{DynamicResource SettingsPageBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="12"
|
||||
Margin="0,0,0,16"
|
||||
Padding="20">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Color="#000000" BlurRadius="8" ShadowDepth="0" Opacity="0.05"/>
|
||||
</Border.Effect>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0"
|
||||
Text="版本更新说明" FontSize="16" FontWeight="SemiBold"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
Margin="0,0,0,16"/>
|
||||
<Border Grid.Row="1"
|
||||
Background="{DynamicResource SettingsPageBackground}"
|
||||
BorderBrush="{DynamicResource SettingsPageBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="8">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Color="#000000" BlurRadius="4" ShadowDepth="0" Opacity="0.03"/>
|
||||
</Border.Effect>
|
||||
<ScrollViewer x:Name="InnerReleaseNotesScrollViewer"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
HorizontalScrollBarVisibility="Disabled"
|
||||
Padding="16"
|
||||
PanningMode="VerticalOnly"
|
||||
PanningRatio="1.0"
|
||||
IsManipulationEnabled="True">
|
||||
<mdxam:MarkdownScrollViewer x:Name="ReleaseNotesViewer"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
MarkdownStyleName="GithubLike"
|
||||
IsHitTestVisible="False"
|
||||
IsManipulationEnabled="False"/>
|
||||
</ScrollViewer>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<!-- 操作按钮区域 -->
|
||||
<ikw:SimpleStackPanel Grid.Row="3" Spacing="16" Margin="0,0,0,0">
|
||||
<Button x:Name="RollbackButton"
|
||||
Content="回滚到此版本"
|
||||
HorizontalAlignment="Center"
|
||||
Click="RollbackButton_Click"
|
||||
Style="{DynamicResource AccentButtonStyle}"
|
||||
Width="200" Height="48"
|
||||
FontSize="16" FontWeight="SemiBold"/>
|
||||
|
||||
<!-- 下载进度面板 -->
|
||||
<Border x:Name="DownloadProgressPanel"
|
||||
Background="{DynamicResource SettingsPageBackground}"
|
||||
BorderBrush="{DynamicResource SettingsPageBorderBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="12"
|
||||
Visibility="Collapsed"
|
||||
Margin="0,8,0,0"
|
||||
Padding="24">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect Color="#000000" BlurRadius="8" ShadowDepth="0" Opacity="0.05"/>
|
||||
</Border.Effect>
|
||||
<ikw:SimpleStackPanel Spacing="12">
|
||||
<ProgressBar x:Name="DownloadProgressBar"
|
||||
Width="300" Height="8"
|
||||
Minimum="0" Maximum="100" Value="0"/>
|
||||
<TextBlock x:Name="DownloadProgressText"
|
||||
Text="正在下载..."
|
||||
FontSize="14"
|
||||
Foreground="{DynamicResource TextPrimaryBrush}"
|
||||
HorizontalAlignment="Center"/>
|
||||
</ikw:SimpleStackPanel>
|
||||
</Border>
|
||||
</ikw:SimpleStackPanel>
|
||||
</Grid>
|
||||
</Window>
|
||||
Reference in New Issue
Block a user