mirror of
https://github.com/AtomUI/AtomUI.git
synced 2026-10-26 03:00:28 +08:00
Add EnableWaveAnimation Token
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
<Theme Name="Daybreak Blue Light">
|
||||
<Algorithms>DefaultAlgorithm</Algorithms>
|
||||
<SharedTokens>
|
||||
<Token Name="EnableMotion" Value="false"/>
|
||||
<Token Name="EnableWaveAnimation" Value="false"/>
|
||||
</SharedTokens>
|
||||
<ControlTokens>
|
||||
</ControlTokens>
|
||||
|
||||
+2
-1
@@ -202,7 +202,8 @@ namespace AtomUI.Theme.Styling
|
||||
public static readonly TokenResourceKey MotionUnit = new TokenResourceKey("MotionUnit");
|
||||
public static readonly TokenResourceKey MotionBase = new TokenResourceKey("MotionBase");
|
||||
public static readonly TokenResourceKey Wireframe = new TokenResourceKey("Wireframe");
|
||||
public static readonly TokenResourceKey Motion = new TokenResourceKey("Motion");
|
||||
public static readonly TokenResourceKey EnableMotion = new TokenResourceKey("EnableMotion");
|
||||
public static readonly TokenResourceKey EnableWaveAnimation = new TokenResourceKey("EnableWaveAnimation");
|
||||
public static readonly TokenResourceKey SizeXXL = new TokenResourceKey("SizeXXL");
|
||||
public static readonly TokenResourceKey SizeXL = new TokenResourceKey("SizeXL");
|
||||
public static readonly TokenResourceKey SizeLG = new TokenResourceKey("SizeLG");
|
||||
|
||||
@@ -120,7 +120,7 @@ internal class ThemeDefinitionReader
|
||||
}
|
||||
else
|
||||
{
|
||||
EmitErrorMsg(reader, $"Element tag: {string.Join('.', _currentElementNames)} not supported.");
|
||||
EmitErrorMsg(reader, $"Element tag: {string.Join('.', _currentElementNames.Reverse())} not supported.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,6 @@ public partial class DesignToken
|
||||
public double OpacityImage { get; set; } = 1.0;
|
||||
|
||||
// ---------- motion ---------- //
|
||||
// TODO: 缺一个懂 motion 的人来收敛 Motion 相关的 Token
|
||||
/// <summary>
|
||||
/// 动画时长变化单位
|
||||
/// 用于控制动画时长的变化单位
|
||||
@@ -157,13 +156,22 @@ public partial class DesignToken
|
||||
// ---------- Style ---------- //
|
||||
/// <summary>
|
||||
/// 线框风格
|
||||
///
|
||||
/// 用于将组件的视觉效果变为线框化,如果需要使用 V4 的效果,需要开启配置项
|
||||
/// </summary>
|
||||
public bool Wireframe { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 动画风格
|
||||
///
|
||||
/// 用于配置动画效果,为 `false` 时则关闭动画
|
||||
/// </summary>
|
||||
public bool Motion { get; set; } = true;
|
||||
public bool EnableMotion { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 是否开启波浪动画
|
||||
///
|
||||
/// 按钮,单选按钮等点击后的波浪动画效果
|
||||
/// </summary>
|
||||
public bool EnableWaveAnimation { get; set; } = true;
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public partial class DesignToken : AbstractDesignToken
|
||||
var screenXXL = 1600;
|
||||
|
||||
// Motion
|
||||
if (!Motion)
|
||||
if (!EnableMotion)
|
||||
{
|
||||
MotionDurationFast = TimeSpan.FromMilliseconds(0);
|
||||
MotionDurationMid = TimeSpan.FromMilliseconds(0);
|
||||
|
||||
Reference in New Issue
Block a user