Improve GroupBox UI/UX

This commit is contained in:
ema
2025-06-04 10:42:24 +08:00
parent 2b38b2c946
commit 376ed30dc5
8 changed files with 102 additions and 13 deletions

View File

@@ -7,6 +7,13 @@
FontSize="14" FontSize="14"
UseLayoutRounding="True" UseLayoutRounding="True"
mc:Ignorable="d"> mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="GroupBox.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="15" /> <RowDefinition Height="15" />
@@ -219,8 +226,11 @@
Grid.Row="11" Grid.Row="11"
Grid.Column="1" Grid.Column="1"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Margin="0,0,16,16" Margin="3,3,16,16"
BorderThickness="0.4" Padding="3"
Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Header="Capabilities"> Header="Capabilities">
<ScrollViewer VerticalScrollBarVisibility="Auto"> <ScrollViewer VerticalScrollBarVisibility="Auto">
<ScrollViewer.Resources> <ScrollViewer.Resources>

View File

@@ -7,6 +7,13 @@
FontSize="14" FontSize="14"
UseLayoutRounding="True" UseLayoutRounding="True"
mc:Ignorable="d"> mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="GroupBox.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="15" /> <RowDefinition Height="15" />
@@ -167,8 +174,11 @@
Grid.Row="8" Grid.Row="8"
Grid.Column="1" Grid.Column="1"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Margin="0,0,16,16" Margin="3,3,16,16"
BorderThickness="0.4" Padding="3"
Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Header="Capabilities"> Header="Capabilities">
<ScrollViewer VerticalScrollBarVisibility="Auto"> <ScrollViewer VerticalScrollBarVisibility="Auto">
<ScrollViewer.Resources> <ScrollViewer.Resources>

View File

@@ -0,0 +1,38 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="using:Wpf.Ui.Controls">
<Style TargetType="{x:Type GroupBox}">
<Setter Property="BorderThickness" Value="1" />
<Setter Property="Border.CornerRadius" Value="4" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type GroupBox}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ContentPresenter Grid.Row="0"
VerticalAlignment="Top"
ContentSource="Header"
RecognizesAccessKey="True"
TextBlock.Foreground="{TemplateBinding Foreground}" />
<Border Grid.Row="1"
Margin="0,3,0,0"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding Border.CornerRadius}">
<ContentPresenter Margin="{TemplateBinding Padding}"
Content="{TemplateBinding Content}"
ContentStringFormat="{TemplateBinding ContentStringFormat}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
</Border>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>

View File

@@ -7,6 +7,13 @@
FontSize="14" FontSize="14"
UseLayoutRounding="True" UseLayoutRounding="True"
mc:Ignorable="d"> mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="GroupBox.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="15" /> <RowDefinition Height="15" />
@@ -285,8 +292,11 @@
Grid.Row="13" Grid.Row="13"
Grid.Column="1" Grid.Column="1"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Margin="0,0,16,16" Margin="3,3,16,16"
BorderThickness="0.4" Padding="3"
Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Header="Capabilities"> Header="Capabilities">
<ScrollViewer VerticalScrollBarVisibility="Auto"> <ScrollViewer VerticalScrollBarVisibility="Auto">
<ScrollViewer.Resources> <ScrollViewer.Resources>

View File

@@ -7,6 +7,13 @@
FontSize="14" FontSize="14"
UseLayoutRounding="True" UseLayoutRounding="True"
mc:Ignorable="d"> mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="GroupBox.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="15" /> <RowDefinition Height="15" />
@@ -236,8 +243,11 @@
Grid.Row="12" Grid.Row="12"
Grid.Column="1" Grid.Column="1"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Margin="0,0,16,16" Margin="3,3,16,16"
BorderThickness="0.4" Padding="3"
Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Header="Capabilities"> Header="Capabilities">
<ScrollViewer VerticalScrollBarVisibility="Auto"> <ScrollViewer VerticalScrollBarVisibility="Auto">
<ScrollViewer.Resources> <ScrollViewer.Resources>

View File

@@ -45,6 +45,7 @@ public partial class IpaInfoPanel : UserControl, IAppInfoPanel
versionNameTitle.Text = TranslationHelper.Get("APP_VERSION_NAME", translationFile); versionNameTitle.Text = TranslationHelper.Get("APP_VERSION_NAME", translationFile);
versionCodeTitle.Text = TranslationHelper.Get("APP_VERSION_CODE", translationFile); versionCodeTitle.Text = TranslationHelper.Get("APP_VERSION_CODE", translationFile);
packageNameTitle.Text = TranslationHelper.Get("PACKAGE_NAME", translationFile); packageNameTitle.Text = TranslationHelper.Get("PACKAGE_NAME", translationFile);
deviceFamilyTitle.Text = TranslationHelper.Get("DEVICE_FAMILY", translationFile);
minimumOSVersionTitle.Text = TranslationHelper.Get("APP_MIN_OS_VERSION", translationFile); minimumOSVersionTitle.Text = TranslationHelper.Get("APP_MIN_OS_VERSION", translationFile);
platformVersionTitle.Text = TranslationHelper.Get("APP_TARGET_OS_VERSION", translationFile); platformVersionTitle.Text = TranslationHelper.Get("APP_TARGET_OS_VERSION", translationFile);
totalSizeTitle.Text = TranslationHelper.Get("TOTAL_SIZE", translationFile); totalSizeTitle.Text = TranslationHelper.Get("TOTAL_SIZE", translationFile);

View File

@@ -69,12 +69,12 @@ public class Plugin : IViewer
{ {
context.PreferredSize = Path.GetExtension(ConfirmPath(path)).ToLower() switch context.PreferredSize = Path.GetExtension(ConfirmPath(path)).ToLower() switch
{ {
".apk" => new Size { Width = 560, Height = 500 }, ".apk" => new Size { Width = 560, Height = 505 },
".ipa" => new Size { Width = 560, Height = 500 }, ".ipa" => new Size { Width = 560, Height = 510 },
".hap" => new Size { Width = 560, Height = 500 }, ".hap" => new Size { Width = 560, Height = 500 },
".msi" => new Size { Width = 520, Height = 230 }, ".msi" => new Size { Width = 520, Height = 230 },
".msix" or ".msixbundle" or ".appx" or ".appxbundle" => new Size { Width = 560, Height = 328 }, ".msix" or ".msixbundle" or ".appx" or ".appxbundle" => new Size { Width = 560, Height = 328 },
".wgt" or ".wgtu" => new Size { Width = 600, Height = 328 }, ".wgt" or ".wgtu" => new Size { Width = 600, Height = 345 },
_ => throw new NotSupportedException("Extension is not supported."), _ => throw new NotSupportedException("Extension is not supported."),
}; };
} }

View File

@@ -7,6 +7,13 @@
FontSize="14" FontSize="14"
UseLayoutRounding="True" UseLayoutRounding="True"
mc:Ignorable="d"> mc:Ignorable="d">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="GroupBox.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="15" /> <RowDefinition Height="15" />
@@ -145,8 +152,11 @@
Grid.Row="8" Grid.Row="8"
Grid.Column="1" Grid.Column="1"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Margin="0,0,16,16" Margin="3,3,16,16"
BorderThickness="0.4" Padding="3"
Background="{DynamicResource CardBackgroundFillColorDefaultBrush}"
BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
Foreground="{DynamicResource WindowTextForegroundAlternative}"
Header="Capabilities"> Header="Capabilities">
<ScrollViewer VerticalScrollBarVisibility="Auto"> <ScrollViewer VerticalScrollBarVisibility="Auto">
<ScrollViewer.Resources> <ScrollViewer.Resources>