From e2a121f024e1ee0428ff73c09b49c02b52ea42c5 Mon Sep 17 00:00:00 2001 From: rabbitism Date: Tue, 24 Jan 2023 13:30:20 +0800 Subject: [PATCH 1/3] fix: Fix TextBox padding, and fix NumericUpDown padding. --- src/Semi.Avalonia/Controls/NumericUpDown.axaml | 2 -- src/Semi.Avalonia/Controls/TextBox.axaml | 11 +++++++---- src/Semi.Avalonia/Themes/Light/TextBox.axaml | 3 ++- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/Semi.Avalonia/Controls/NumericUpDown.axaml b/src/Semi.Avalonia/Controls/NumericUpDown.axaml index eab646d..300bce6 100644 --- a/src/Semi.Avalonia/Controls/NumericUpDown.axaml +++ b/src/Semi.Avalonia/Controls/NumericUpDown.axaml @@ -18,8 +18,6 @@ ShowButtonSpinner="{TemplateBinding ShowButtonSpinner}"> + Foreground="{DynamicResource TextBoxInnerForeground}" + IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerLeftContent, Converter={x:Static ObjectConverters.IsNotNull}}" /> + Foreground="{DynamicResource TextBoxInnerForeground}" + IsVisible="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=InnerRightContent, Converter={x:Static ObjectConverters.IsNotNull}}" /> diff --git a/src/Semi.Avalonia/Themes/Light/TextBox.axaml b/src/Semi.Avalonia/Themes/Light/TextBox.axaml index 6f1a2d4..1f8f813 100644 --- a/src/Semi.Avalonia/Themes/Light/TextBox.axaml +++ b/src/Semi.Avalonia/Themes/Light/TextBox.axaml @@ -38,7 +38,8 @@ 0 3 3 0 0 0 0 0 - 8 0 + 8 0 0 0 + 0 0 8 0 8 0 1 From 3fe073e40563d03ed7ea9911e6076f20a74ba64f Mon Sep 17 00:00:00 2001 From: rabbitism Date: Tue, 24 Jan 2023 13:32:36 +0800 Subject: [PATCH 2/3] fix: fix flyout default foreground. --- src/Semi.Avalonia/Controls/FlyoutPresenter.axaml | 4 +++- src/Semi.Avalonia/Themes/Light/Flyout.axaml | 6 ++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Semi.Avalonia/Controls/FlyoutPresenter.axaml b/src/Semi.Avalonia/Controls/FlyoutPresenter.axaml index 651916d..f39e3ee 100644 --- a/src/Semi.Avalonia/Controls/FlyoutPresenter.axaml +++ b/src/Semi.Avalonia/Controls/FlyoutPresenter.axaml @@ -12,6 +12,7 @@ + @@ -37,7 +38,8 @@ VerticalContentAlignment="Stretch" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" - FontWeight="{TemplateBinding FontWeight}" /> + FontWeight="{TemplateBinding FontWeight}" + TextElement.Foreground="{TemplateBinding Foreground}" /> diff --git a/src/Semi.Avalonia/Themes/Light/Flyout.axaml b/src/Semi.Avalonia/Themes/Light/Flyout.axaml index ca7579e..bad27c3 100644 --- a/src/Semi.Avalonia/Themes/Light/Flyout.axaml +++ b/src/Semi.Avalonia/Themes/Light/Flyout.axaml @@ -3,10 +3,8 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:sys="clr-namespace:System;assembly=System.Runtime"> - + + 400 1 0 0 8 0 #1A000000 From f42cbba0a08aa6a816dc974ec806a24efff98000 Mon Sep 17 00:00:00 2001 From: rabbitism Date: Tue, 24 Jan 2023 13:38:14 +0800 Subject: [PATCH 3/3] fix: Fix TreeViewItem ToggleButton size. --- src/Semi.Avalonia/Controls/TreeView.axaml | 35 +++++++++++-------- src/Semi.Avalonia/Themes/Light/TreeView.axaml | 7 ++-- 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/src/Semi.Avalonia/Controls/TreeView.axaml b/src/Semi.Avalonia/Controls/TreeView.axaml index d278dbd..e0bc939 100644 --- a/src/Semi.Avalonia/Controls/TreeView.axaml +++ b/src/Semi.Avalonia/Controls/TreeView.axaml @@ -1,10 +1,12 @@ @@ -62,7 +64,9 @@ + Focusable="True" + TemplatedControl.IsTemplateFocusTarget="True"> - - - + 20 8 @@ -19,6 +20,6 @@ - 0 0 8 0 - 8 4 0 4 + 8 0 + 0 4 0 4