From e57036163db9edde42d665dba0f7333ba56009a3 Mon Sep 17 00:00:00 2001
From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
Date: Tue, 14 Jan 2025 21:28:41 +0800
Subject: [PATCH] feat: add Gap property to Avatar.
---
demo/Ursa.Demo/Pages/AvatarDemo.axaml | 6 ++++
src/Ursa.Themes.Semi/Controls/Avatar.axaml | 32 +++++++++++++------
src/Ursa/Controls/Avatar/Avatar.cs | 9 ++++++
...erter.cs => DoubleToThicknessConverter.cs} | 7 ++--
4 files changed, 42 insertions(+), 12 deletions(-)
rename src/Ursa/Converters/{DivideByTwoConverter.cs => DoubleToThicknessConverter.cs} (72%)
diff --git a/demo/Ursa.Demo/Pages/AvatarDemo.axaml b/demo/Ursa.Demo/Pages/AvatarDemo.axaml
index c3046c3..e401bfc 100644
--- a/demo/Ursa.Demo/Pages/AvatarDemo.axaml
+++ b/demo/Ursa.Demo/Pages/AvatarDemo.axaml
@@ -93,5 +93,11 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Ursa.Themes.Semi/Controls/Avatar.axaml b/src/Ursa.Themes.Semi/Controls/Avatar.axaml
index 4fe9705..b8cfc97 100644
--- a/src/Ursa.Themes.Semi/Controls/Avatar.axaml
+++ b/src/Ursa.Themes.Semi/Controls/Avatar.axaml
@@ -3,12 +3,20 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:u="https://irihi.tech/ursa"
xmlns:converters="clr-namespace:Ursa.Converters;assembly=Ursa">
-
+
+
+
+
+
+
+
+
+
@@ -24,14 +32,20 @@
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