From 3761a0a3fb1aa217755164cf2082f4491844b2b6 Mon Sep 17 00:00:00 2001
From: snail1519 <58659256+snail1519@users.noreply.github.com>
Date: Wed, 26 Feb 2025 10:45:24 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DComboBox=E6=8E=A7?=
=?UTF-8?q?=E4=BB=B6=E7=9A=84PlaceholderForeground=E5=B1=9E=E6=80=A7?=
=?UTF-8?q?=E5=A4=B1=E6=95=88=20(#543)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
* fix: 修复ComboBox控件的PlaceholderForeground属性失效
* Update src/Semi.Avalonia/Themes/Dark/ComboBox.axaml
Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
* Update src/Semi.Avalonia/Controls/ComboBox.axaml
Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
* Update src/Semi.Avalonia/Themes/Light/ComboBox.axaml
Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
* add: 对比色主题添加ComboBoxSelectorPlaceHolderForeground资源
* Revert "add: 对比色主题添加ComboBoxSelectorPlaceHolderForeground资源"
This reverts commit ba526e2cf93d1cd2eede17b953742eab5249b659.
* add: 对比色主题添加ComboBoxSelectorPlaceHolderForeground资源
* Update src/Semi.Avalonia/Themes/HighContrast/ComboBox.axaml
Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
---------
Co-authored-by: Zhang Dian <54255897+zdpcdt@users.noreply.github.com>
---
src/Semi.Avalonia/Controls/ComboBox.axaml | 6 +++---
src/Semi.Avalonia/Themes/Dark/ComboBox.axaml | 1 +
src/Semi.Avalonia/Themes/HighContrast/ComboBox.axaml | 1 +
src/Semi.Avalonia/Themes/Light/ComboBox.axaml | 1 +
4 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/Semi.Avalonia/Controls/ComboBox.axaml b/src/Semi.Avalonia/Controls/ComboBox.axaml
index 2b3fa59..5ced6b2 100644
--- a/src/Semi.Avalonia/Controls/ComboBox.axaml
+++ b/src/Semi.Avalonia/Controls/ComboBox.axaml
@@ -12,7 +12,7 @@
BBB
CCC
-
+
AAA
BBB
CCC
@@ -44,6 +44,7 @@
+
@@ -65,9 +66,8 @@
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
TextTrimming="CharacterEllipsis"
- Foreground="{TemplateBinding Foreground}"
+ Foreground="{TemplateBinding PlaceholderForeground}"
IsVisible="{TemplateBinding SelectionBoxItem,Converter={x:Static ObjectConverters.IsNull}}"
- Opacity="0.3"
Text="{TemplateBinding PlaceholderText}" />
+
diff --git a/src/Semi.Avalonia/Themes/HighContrast/ComboBox.axaml b/src/Semi.Avalonia/Themes/HighContrast/ComboBox.axaml
index af69299..8c328d4 100644
--- a/src/Semi.Avalonia/Themes/HighContrast/ComboBox.axaml
+++ b/src/Semi.Avalonia/Themes/HighContrast/ComboBox.axaml
@@ -1,5 +1,6 @@
+
diff --git a/src/Semi.Avalonia/Themes/Light/ComboBox.axaml b/src/Semi.Avalonia/Themes/Light/ComboBox.axaml
index 4df35d1..ceafd18 100644
--- a/src/Semi.Avalonia/Themes/Light/ComboBox.axaml
+++ b/src/Semi.Avalonia/Themes/Light/ComboBox.axaml
@@ -1,5 +1,6 @@
+