From 2b1a6417285597bc58ef28aa3f01aeee2532cd19 Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期二, 04 三月 2025 13:36:17 +0800
Subject: [PATCH] 优化UI;

---
 HMI.UI/Style/PanuonResource.xaml |   50 ++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 42 insertions(+), 8 deletions(-)

diff --git a/HMI.UI/Style/PanuonResource.xaml b/HMI.UI/Style/PanuonResource.xaml
index 792c26e..3e74649 100644
--- a/HMI.UI/Style/PanuonResource.xaml
+++ b/HMI.UI/Style/PanuonResource.xaml
@@ -13,6 +13,7 @@
 
     <sys:Double x:Key="TitleFontSize">20</sys:Double>
     <sys:Double x:Key="ContentFontSize">16</sys:Double>
+    <sys:Double x:Key="ContentFontSize2">14</sys:Double>
 
     <Style x:Key="PrimaryButton" TargetType="Button" BasedOn="{StaticResource {x:Static pu:StyleKeys.ButtonStyle}}">
         <Setter Property="Background" Value="{StaticResource PrimaryColor}"/>
@@ -67,6 +68,22 @@
         <Setter Property="Foreground" Value="{StaticResource DangerColor}"/>
     </Style>
 
+    <Style x:Key="CommonToggle" TargetType="ToggleButton" BasedOn="{StaticResource {x:Static pu:StyleKeys.ToggleButtonStyle}}">
+        <Setter Property="Background" Value="#FFF"/>
+        <Setter Property="Foreground" Value="Black"/>
+        <Setter Property="BorderBrush" Value="LightGray"/>
+        <Setter Property="Cursor" Value="Hand"/>
+    </Style>
+
+    <Style x:Key="CommonMenu" TargetType="Menu" BasedOn="{StaticResource {x:Static pu:StyleKeys.MenuStyle}}">
+        <Setter Property="Background" Value="{StaticResource PrimaryColor}"/>
+        <Setter Property="Foreground" Value="#FFF"/>
+        <Setter Property="pu:IconHelper.FontFamily" Value="{StaticResource iconfont}"/>
+        <Setter Property="pu:IconHelper.Margin" Value="0,0,10,0"/>
+        <Setter Property="BorderThickness" Value="0"/>
+        <Setter Property="Cursor" Value="Hand"/>
+    </Style>
+
     <Style x:Key="CardBoarder" TargetType="Border">
         <Setter Property="BorderBrush" Value="{StaticResource CommonBoarder}"/>
         <Setter Property="BorderThickness" Value="2"/>
@@ -80,22 +97,31 @@
             <Style TargetType="DataGridCell" 
                    BasedOn="{StaticResource {x:Static pu:StyleKeys.DataGridCellStyle}}">
                 <Setter Property="Background" Value="Transparent"/>
-                <Setter Property="Padding" Value="0"/>
+                <Setter Property="Padding" Value="5"/>
                 <Setter Property="BorderThickness" Value="0"/>
                 <Setter Property="VerticalAlignment" Value="Stretch"/>
                 <Setter Property="Background" Value="Transparent"/>
             </Style>
-            <Style TargetType="TextBlock">
+            <!--<Style TargetType="TextBlock">
                 <Setter Property="VerticalAlignment" Value="Center"/>
-                <Setter Property="Padding" Value="10"/>
-            </Style>
-        </Style.Resources>
+                <Setter Property="Padding" Value="5"/>
+            </Style>-->
 
+            <Style TargetType="DataGridColumnHeader" 
+       BasedOn="{StaticResource {x:Static pu:StyleKeys.DataGridColumnHeaderStyle}}">
+                <Setter Property="Padding" Value="10"/>
+                <Setter Property="BorderThickness" Value="0"/>
+            </Style>
+
+        </Style.Resources>
+        <Setter Property="Foreground" Value="#FF9B9B9B"/>
+        <Setter Property="pu:DataGridHelper.ColumnHeaderForeground" Value="#878787"/>
         <Setter Property="pu:DataGridHelper.ColumnHeaderBackground" Value="{StaticResource TableHeaderBackground}"/>
         <Setter Property="pu:DataGridHelper.ColumnHeaderHoverBackground" Value="{StaticResource TableHeaderBackground}"/>
         <Setter Property="pu:DataGridHelper.ColumnHeaderSeparatorBrush" Value="{StaticResource TableBoarder}"/>
         <Setter Property="pu:DataGridHelper.ColumnHeaderSeparatorVisibility" Value="Visible"/>
         <Setter Property="pu:DataGridHelper.ColumnHeaderVerticalContentAlignment" Value="Center"/>
+        <Setter Property="pu:DataGridHelper.ColumnHeaderHorizontalContentAlignment" Value="Left"/>
         <Setter Property="pu:DataGridHelper.RowHeaderBackground" Value="White"/>
         <Setter Property="pu:DataGridHelper.RowHeaderSeparatorBrush" Value="{StaticResource PrimaryColor}"/>
         <Setter Property="pu:DataGridHelper.RowHoverForeground" Value="{StaticResource SecondPrimaryColorContract}"/>
@@ -112,9 +138,11 @@
         <Setter Property="RowHeaderWidth" Value="0"/>
         <Setter Property="IsReadOnly" Value="True"/>
         <Setter Property="GridLinesVisibility" Value="All"/>
-        <Setter Property="BorderThickness" Value="0"/>
-        <Setter Property="FontSize" Value="{StaticResource ContentFontSize}"/>
-        <Setter Property="RowHeight" Value="24"/>
+        <Setter Property="BorderThickness" Value="1,1,0,0"/>
+        <Setter Property="BorderBrush" Value="{StaticResource CommonBoarder}"/>
+        <Setter Property="FontSize" Value="{StaticResource ContentFontSize2}"/>
+        <Setter Property="RowHeight" Value="30"/>
+        <Setter Property="ColumnHeaderHeight" Value="36"/>
         <Setter Property="ForceCursor" Value="True"/>
         <Setter Property="SelectionMode" Value="Single"/>
         <Setter Property="pu:DataGridHelper.ColumnHeaderBorderThickness" Value="0"/>
@@ -171,4 +199,10 @@
         <Setter Property="VerticalAlignment" Value="Center"/>
         <Setter Property="FontSize" Value="{StaticResource TitleFontSize}"/>
     </Style>
+
+    <Style x:Key="FormHeader" TargetType="TextBlock">
+        <Setter Property="VerticalAlignment" Value="Center"/>
+        <Setter Property="HorizontalAlignment" Value="Center"/>
+        <Setter Property="FontSize" Value="{StaticResource ContentFontSize2}"/>
+    </Style>
 </ResourceDictionary>
\ No newline at end of file

--
Gitblit v1.9.1