From 46e57925b948302221257c4685310f2eba554568 Mon Sep 17 00:00:00 2001 From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> Date: Mon, 11 Mar 2024 19:16:56 +0800 Subject: [PATCH] feat: redesign TextBox. --- demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml | 12 ++++++++++++ src/Semi.Avalonia/Controls/TextBox.axaml | 6 ++++++ src/Semi.Avalonia/Themes/Shared/TextBox.axaml | 1 - 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml b/demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml index b12fa1f..e5af706 100644 --- a/demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml +++ b/demo/Semi.Avalonia.Demo/Pages/TextBoxDemo.axaml @@ -10,6 +10,18 @@ mc:Ignorable="d"> + + + + + + + + + + + + diff --git a/src/Semi.Avalonia/Controls/TextBox.axaml b/src/Semi.Avalonia/Controls/TextBox.axaml index 6872830..6a61b63 100644 --- a/src/Semi.Avalonia/Controls/TextBox.axaml +++ b/src/Semi.Avalonia/Controls/TextBox.axaml @@ -53,11 +53,13 @@ + + @@ -69,6 +71,7 @@ Name="PART_ContentPresenterBorder" MinHeight="{DynamicResource TextBoxWrapperDefaultHeight}" Background="{TemplateBinding Background}" + BackgroundSizing="{TemplateBinding BackgroundSizing}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}"> @@ -243,6 +246,7 @@ + @@ -250,6 +254,7 @@ + @@ -261,6 +266,7 @@ Name="PART_ContentPresenterBorder" MinHeight="{TemplateBinding MinHeight}" Background="{TemplateBinding Background}" + BackgroundSizing="{TemplateBinding BackgroundSizing}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}"> diff --git a/src/Semi.Avalonia/Themes/Shared/TextBox.axaml b/src/Semi.Avalonia/Themes/Shared/TextBox.axaml index 07fbe67..d2cb96a 100644 --- a/src/Semi.Avalonia/Themes/Shared/TextBox.axaml +++ b/src/Semi.Avalonia/Themes/Shared/TextBox.axaml @@ -1,5 +1,4 @@ - 22 32 24 40