From 58c1c365a9bce2a95f3075bd9ed7ccb797b169a9 Mon Sep 17 00:00:00 2001
From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
Date: Tue, 21 Jan 2025 23:50:22 +0800
Subject: [PATCH] misc: revert DynamicResource Copy Button.
---
.../Pages/HighContrastDemo.axaml | 19 +++-------
.../Pages/VariablesDemo.axaml | 19 +++-------
.../Themes/FunctionalColorGroupControl.axaml | 38 +++++--------------
.../Themes/ShadowGroupControl.axaml | 38 +++++--------------
.../ViewModels/HighContrastDemoViewModel.cs | 7 +---
.../ViewModels/PaletteDemoViewModel.cs | 14 +------
.../ViewModels/VariablesDemoViewModel.cs | 7 +---
7 files changed, 34 insertions(+), 108 deletions(-)
diff --git a/demo/Semi.Avalonia.Demo/Pages/HighContrastDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/HighContrastDemo.axaml
index 78116ef..2f4288e 100644
--- a/demo/Semi.Avalonia.Demo/Pages/HighContrastDemo.axaml
+++ b/demo/Semi.Avalonia.Demo/Pages/HighContrastDemo.axaml
@@ -311,20 +311,11 @@
-
-
-
-
+
diff --git a/demo/Semi.Avalonia.Demo/Pages/VariablesDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/VariablesDemo.axaml
index 20032b3..9db4525 100644
--- a/demo/Semi.Avalonia.Demo/Pages/VariablesDemo.axaml
+++ b/demo/Semi.Avalonia.Demo/Pages/VariablesDemo.axaml
@@ -55,20 +55,11 @@
-
-
-
-
+
diff --git a/demo/Semi.Avalonia.Demo/Themes/FunctionalColorGroupControl.axaml b/demo/Semi.Avalonia.Demo/Themes/FunctionalColorGroupControl.axaml
index f59de67..e48d547 100644
--- a/demo/Semi.Avalonia.Demo/Themes/FunctionalColorGroupControl.axaml
+++ b/demo/Semi.Avalonia.Demo/Themes/FunctionalColorGroupControl.axaml
@@ -70,20 +70,11 @@
-
-
-
-
+
@@ -143,20 +134,11 @@
-
-
-
-
+
diff --git a/demo/Semi.Avalonia.Demo/Themes/ShadowGroupControl.axaml b/demo/Semi.Avalonia.Demo/Themes/ShadowGroupControl.axaml
index a50fb67..286b13c 100644
--- a/demo/Semi.Avalonia.Demo/Themes/ShadowGroupControl.axaml
+++ b/demo/Semi.Avalonia.Demo/Themes/ShadowGroupControl.axaml
@@ -49,20 +49,11 @@
-
-
-
-
+
@@ -101,20 +92,11 @@
-
-
-
-
+
diff --git a/demo/Semi.Avalonia.Demo/ViewModels/HighContrastDemoViewModel.cs b/demo/Semi.Avalonia.Demo/ViewModels/HighContrastDemoViewModel.cs
index 3043047..16c7b05 100644
--- a/demo/Semi.Avalonia.Demo/ViewModels/HighContrastDemoViewModel.cs
+++ b/demo/Semi.Avalonia.Demo/ViewModels/HighContrastDemoViewModel.cs
@@ -126,13 +126,8 @@ public partial class ColorResource : ObservableObject
[ObservableProperty] private string? _description;
[ObservableProperty] private string? _pairWith;
- public string CopyText1 =>
+ public string CopyText =>
$"""
""";
-
- public string CopyText2 =>
- $"""
-
- """;
}
\ No newline at end of file
diff --git a/demo/Semi.Avalonia.Demo/ViewModels/PaletteDemoViewModel.cs b/demo/Semi.Avalonia.Demo/ViewModels/PaletteDemoViewModel.cs
index deddf1a..f1e0065 100644
--- a/demo/Semi.Avalonia.Demo/ViewModels/PaletteDemoViewModel.cs
+++ b/demo/Semi.Avalonia.Demo/ViewModels/PaletteDemoViewModel.cs
@@ -135,16 +135,11 @@ public partial class ColorItemViewModel : ObservableObject
[ObservableProperty] private string? _colorResourceKey;
[ObservableProperty] private string? _hex;
- public string CopyText1 =>
+ public string CopyText =>
$"""
""";
- public string CopyText2 =>
- $"""
-
- """;
-
public ColorItemViewModel(string colorDisplayName, ISolidColorBrush brush, string resourceKey, bool light,
int index)
{
@@ -201,16 +196,11 @@ public partial class ShadowItemViewModel : ObservableObject
[ObservableProperty] private string? _resourceKey;
[ObservableProperty] private string? _boxShadowValue;
- public string CopyText1 =>
+ public string CopyText =>
$"""
""";
- public string CopyText2 =>
- $"""
-
- """;
-
public ShadowItemViewModel(string shadowDisplayName, BoxShadows boxShadows, string resourceKey)
{
ShadowDisplayName = shadowDisplayName;
diff --git a/demo/Semi.Avalonia.Demo/ViewModels/VariablesDemoViewModel.cs b/demo/Semi.Avalonia.Demo/ViewModels/VariablesDemoViewModel.cs
index 43a538e..753d23a 100644
--- a/demo/Semi.Avalonia.Demo/ViewModels/VariablesDemoViewModel.cs
+++ b/demo/Semi.Avalonia.Demo/ViewModels/VariablesDemoViewModel.cs
@@ -76,16 +76,11 @@ public partial class VariableItemViewModel : ObservableObject
[ObservableProperty] private string? _description;
[ObservableProperty] private string? _value;
- public string CopyText1 =>
+ public string CopyText =>
$"""
""";
- public string CopyText2 =>
- $"""
-
- """;
-
public VariableItemViewModel(string description, object value, string resourceKey)
{
ResourceKey = resourceKey;