From a366ca6f0ca7b3637ccfb23fe814e0af3ae4bc77 Mon Sep 17 00:00:00 2001
From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
Date: Fri, 17 Jan 2025 16:05:52 +0800
Subject: [PATCH] feat: using Padding instead of Gap in Avatar.
---
demo/Ursa.Demo/Pages/AvatarDemo.axaml | 4 ++--
src/Ursa.Themes.Semi/Controls/Avatar.axaml | 15 +++++-------
src/Ursa/Controls/Avatar/Avatar.cs | 9 --------
.../Converters/DoubleToThicknessConverter.cs | 23 -------------------
4 files changed, 8 insertions(+), 43 deletions(-)
delete mode 100644 src/Ursa/Converters/DoubleToThicknessConverter.cs
diff --git a/demo/Ursa.Demo/Pages/AvatarDemo.axaml b/demo/Ursa.Demo/Pages/AvatarDemo.axaml
index e401bfc..1524a7d 100644
--- a/demo/Ursa.Demo/Pages/AvatarDemo.axaml
+++ b/demo/Ursa.Demo/Pages/AvatarDemo.axaml
@@ -95,8 +95,8 @@
-
-
+
+
diff --git a/src/Ursa.Themes.Semi/Controls/Avatar.axaml b/src/Ursa.Themes.Semi/Controls/Avatar.axaml
index b8cfc97..68a9b78 100644
--- a/src/Ursa.Themes.Semi/Controls/Avatar.axaml
+++ b/src/Ursa.Themes.Semi/Controls/Avatar.axaml
@@ -1,22 +1,20 @@
+ xmlns:u="https://irihi.tech/ursa">
-
-
+
+
-
-
+
@@ -32,10 +30,9 @@
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}"
- Background="{TemplateBinding Background}">
-
+ Background="{TemplateBinding Background}" />
GapProperty = AvaloniaProperty.Register(
- nameof(Gap));
-
public static readonly StyledProperty SourceProperty = AvaloniaProperty.Register(
nameof(Source));
public static readonly StyledProperty