From 4cac1b533e133fdc8b3def90a0f998820f51907a Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期三, 26 三月 2025 17:57:59 +0800
Subject: [PATCH] 优化UI,新增日志自动删除;
---
HMI.UI/Style/MsgBoxStyle.xaml | 33 +++++++++++++++++++++++++--------
1 files changed, 25 insertions(+), 8 deletions(-)
diff --git a/HMI.UI/Style/MsgBoxStyle.xaml b/HMI.UI/Style/MsgBoxStyle.xaml
index f782ed6..1858f41 100644
--- a/HMI.UI/Style/MsgBoxStyle.xaml
+++ b/HMI.UI/Style/MsgBoxStyle.xaml
@@ -11,6 +11,9 @@
<Style TargetType="pu:WindowX" BasedOn="{StaticResource {x:Static pu:MessageBoxX.WindowXStyleKey}}">
<Setter Property="pu:WindowXCaption.Background" Value="{StaticResource WarningColor}" />
<Setter Property="pu:WindowXCaption.Foreground" Value="{StaticResource WarningColorContract}" />
+ <Setter Property="Width" Value="350" />
+ <Setter Property="Height" Value="200" />
+ <Setter Property="SizeToContent" Value="Manual" />
</Style>
</pu:MessageBoxXSettings.WindowXStyle>
@@ -47,6 +50,9 @@
<Style TargetType="pu:WindowX" BasedOn="{StaticResource {x:Static pu:MessageBoxX.WindowXStyleKey}}">
<Setter Property="pu:WindowXCaption.Background" Value="{StaticResource DangerColor}" />
<Setter Property="pu:WindowXCaption.Foreground" Value="{StaticResource DangerColorContrast}" />
+ <Setter Property="Width" Value="350" />
+ <Setter Property="Height" Value="200" />
+ <Setter Property="SizeToContent" Value="Manual" />
</Style>
</pu:MessageBoxXSettings.WindowXStyle>
@@ -83,6 +89,9 @@
<Style TargetType="pu:WindowX" BasedOn="{StaticResource {x:Static pu:MessageBoxX.WindowXStyleKey}}">
<Setter Property="pu:WindowXCaption.Background" Value="{StaticResource PrimaryColor}" />
<Setter Property="pu:WindowXCaption.Foreground" Value="{StaticResource PrimaryColorContract}" />
+ <Setter Property="Width" Value="350" />
+ <Setter Property="Height" Value="200" />
+ <Setter Property="SizeToContent" Value="Manual" />
</Style>
</pu:MessageBoxXSettings.WindowXStyle>
@@ -112,22 +121,30 @@
</pu:MessageBoxXSettings.ButtonStyle>
</pu:MessageBoxXSettings>
- <pu:ToastSettings x:Key="toastSuccess" Spacing="25">
- <pu:ToastSettings.LabelStyle>
+ <pu:ToastSetting x:Key="toastSuccess" Spacing="25">
+ <pu:ToastSetting.LabelStyle>
<Style TargetType="Label" BasedOn="{StaticResource {x:Static pu:Toast.LabelStyleKey}}">
<Setter Property="Background" Value="{StaticResource SuccessColor}" />
<Setter Property="Foreground" Value="{StaticResource SuccessColorContrast}" />
</Style>
- </pu:ToastSettings.LabelStyle>
- </pu:ToastSettings>
+ </pu:ToastSetting.LabelStyle>
+ </pu:ToastSetting>
- <pu:ToastSettings x:Key="toastWarning" Spacing="25">
- <pu:ToastSettings.LabelStyle>
+ <pu:ToastSetting x:Key="toastWarning" Spacing="25">
+ <pu:ToastSetting.LabelStyle>
<Style TargetType="Label" BasedOn="{StaticResource {x:Static pu:Toast.LabelStyleKey}}">
<Setter Property="Background" Value="{StaticResource WarningColor}" />
<Setter Property="Foreground" Value="{StaticResource SuccessColorContrast}" />
</Style>
- </pu:ToastSettings.LabelStyle>
- </pu:ToastSettings>
+ </pu:ToastSetting.LabelStyle>
+ </pu:ToastSetting>
+ <pu:ToastSetting x:Key="toastError" Spacing="25">
+ <pu:ToastSetting.LabelStyle>
+ <Style TargetType="Label" BasedOn="{StaticResource {x:Static pu:Toast.LabelStyleKey}}">
+ <Setter Property="Background" Value="{StaticResource DangerColor}" />
+ <Setter Property="Foreground" Value="{StaticResource DangerColorContrast}" />
+ </Style>
+ </pu:ToastSetting.LabelStyle>
+ </pu:ToastSetting>
</ResourceDictionary>
\ No newline at end of file
--
Gitblit v1.9.1