rework overview composition and artwork placement

This commit is contained in:
acetaffy
2026-09-23 16:40:06 +08:00
parent ccc2c3feac
commit 1a559c300c
+27 -29
View File
@@ -10,8 +10,8 @@
<SolidColorBrush x:Key="Purple" Color="#7653A6"/>
<SolidColorBrush x:Key="TextPrimary" Color="#2D2933"/>
<SolidColorBrush x:Key="TextSecondary" Color="#6F6878"/>
<SolidColorBrush x:Key="Panel" Color="#E8FFFFFF"/>
<SolidColorBrush x:Key="PanelLight" Color="#E5F8F4FA"/>
<SolidColorBrush x:Key="Panel" Color="#FAFFFFFF"/>
<SolidColorBrush x:Key="PanelLight" Color="#F8F8F4FA"/>
<SolidColorBrush x:Key="Stroke" Color="#FFD8D3DD"/>
<Style TargetType="Button">
@@ -125,8 +125,16 @@
</Window.Resources>
<Grid Background="#F3F2F6" ClipToBounds="True">
<Image Source="Assets/taffy-fan-background.jpg" Stretch="UniformToFill" Opacity="0.46"/>
<Rectangle Fill="#32F8F5F9"/>
<Image Source="Assets/taffy-fan-background.jpg" Stretch="UniformToFill" HorizontalAlignment="Right" Opacity="0.22"/>
<Rectangle>
<Rectangle.Fill>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#F8F3F1F6" Offset="0"/>
<GradientStop Color="#EAF3F1F6" Offset="0.62"/>
<GradientStop Color="#55F3F1F6" Offset="1"/>
</LinearGradientBrush>
</Rectangle.Fill>
</Rectangle>
<Grid Margin="14">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
@@ -134,23 +142,15 @@
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" CornerRadius="6" Padding="12" Margin="0,0,0,9" BorderBrush="#FFE7A4C5" BorderThickness="1" ClipToBounds="True">
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
<GradientStop Color="#FFF8DDEA" Offset="0"/>
<GradientStop Color="#FFF2C4DD" Offset="0.48"/>
<GradientStop Color="#FFE5D4F3" Offset="1"/>
</LinearGradientBrush>
</Border.Background>
<Border Grid.Row="0" Height="82" CornerRadius="6" Padding="12,8" Margin="0,0,0,9" Background="#F8FFFFFF" BorderBrush="#FFE0D9E3" BorderThickness="1" ClipToBounds="True">
<Grid>
<Grid.ColumnDefinitions><ColumnDefinition Width="Auto"/><ColumnDefinition Width="Auto"/><ColumnDefinition Width="*"/><ColumnDefinition Width="Auto"/></Grid.ColumnDefinitions>
<Image Grid.Column="2" Grid.ColumnSpan="2" Source="Assets/taffy-fan-background.jpg" Width="500" Stretch="UniformToFill" HorizontalAlignment="Right" Opacity="0.58" Margin="0,-90,-12,-90"/>
<Ellipse Grid.Column="0" Width="68" Height="68" Stroke="#FFFFFFFF" StrokeThickness="3" Margin="0,0,12,0">
<Ellipse Grid.Column="0" Width="54" Height="54" Stroke="#FFF0B8D3" StrokeThickness="2" Margin="0,0,12,0">
<Ellipse.Fill><ImageBrush ImageSource="Assets/taffy-avatar.jpg" Stretch="UniformToFill"/></Ellipse.Fill>
</Ellipse>
<StackPanel Grid.Column="1" VerticalAlignment="Center" Margin="0,0,22,0">
<TextBlock Text="BMS Monitor" FontSize="22" FontWeight="Bold" Foreground="#6C3556"/>
<TextBlock Text="CAN 电池监控" FontSize="12" Foreground="#A24476" Margin="0,3,0,0"/>
<TextBlock Text="BMS Monitor" FontSize="20" FontWeight="SemiBold" Foreground="#453D49"/>
<TextBlock Text="CAN 电池监控" FontSize="12" Foreground="#8B7182" Margin="0,2,0,0"/>
</StackPanel>
<StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock Text="设备" VerticalAlignment="Center" Foreground="#5D5365"/>
@@ -173,18 +173,10 @@
<TabControl Grid.Row="1">
<TabItem Header="概览">
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel Margin="0,2,0,10">
<Border Height="108" CornerRadius="5" BorderBrush="#FFE4B5D0" BorderThickness="1" Margin="4,0,4,5" ClipToBounds="True">
<Grid>
<Image Source="Assets/taffy-fan-background.jpg" Stretch="UniformToFill" Opacity="0.92"/>
<Border Width="410" HorizontalAlignment="Left" Background="#EFFFFFFF"/>
<Border Width="6" Background="#FFE8589C" HorizontalAlignment="Left" Margin="0,14" CornerRadius="0,3,3,0"/>
<StackPanel VerticalAlignment="Center" Margin="24,0">
<TextBlock Text="电池状态总览" FontSize="20" FontWeight="Bold" Foreground="#753A61"/>
<TextBlock Text="CAN 实时数据" FontSize="13" Foreground="#A24D7D" Margin="0,5,0,0"/>
</StackPanel>
</Grid>
</Border>
<Grid Margin="0,4,0,10">
<Grid.ColumnDefinitions><ColumnDefinition Width="*"/><ColumnDefinition Width="320"/></Grid.ColumnDefinitions>
<StackPanel Grid.Column="0" Margin="0,0,8,0">
<TextBlock Text="电池状态总览" FontSize="18" FontWeight="SemiBold" Foreground="#554A59" Margin="6,6,6,8"/>
<UniformGrid Columns="4">
<Border Style="{StaticResource Card}"><StackPanel><TextBlock Text="总电压" Style="{StaticResource CardLabel}"/><TextBlock x:Name="PackVoltageText" Text="--.- V" Style="{StaticResource Value}"/></StackPanel></Border>
<Border Style="{StaticResource Card}" BorderBrush="#FFE8A1C6"><StackPanel><TextBlock Text="总电流 I" Style="{StaticResource CardLabel}"/><TextBlock x:Name="PackCurrentText" Text="--.- A" Style="{StaticResource Value}"/></StackPanel></Border>
@@ -204,7 +196,13 @@
<StackPanel Grid.Column="1"><TextBlock Text="当前故障" FontSize="15" FontWeight="SemiBold"/><TextBlock x:Name="FaultText" Text="等待数据" Foreground="#C83E78" FontSize="18" Margin="0,9,0,0" TextWrapping="Wrap"/></StackPanel>
</Grid>
</Border>
</StackPanel>
</StackPanel>
<Border Grid.Column="1" Margin="4,6,4,6" CornerRadius="6" BorderBrush="#FFE1B2CA" BorderThickness="1" ClipToBounds="True">
<Border.Background>
<ImageBrush ImageSource="Assets/taffy-fan-background.jpg" Stretch="UniformToFill" AlignmentX="Right"/>
</Border.Background>
</Border>
</Grid>
</ScrollViewer>
</TabItem>