From b9c87e15e8e9fda704ddeb34e01810f41e72826e Mon Sep 17 00:00:00 2001 From: Sunny Date: Tue, 18 Mar 2025 22:36:33 +0800 Subject: [PATCH] =?UTF-8?q?*=20UIComboBox:=20=E4=BF=AE=E5=A4=8D=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E4=B8=8B=E6=8B=89=E6=A1=86=E8=B7=9F=E9=9A=8F=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E9=85=8D=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Controls/UIComboBox.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/SunnyUI/Controls/UIComboBox.cs b/SunnyUI/Controls/UIComboBox.cs index afc50f06..9eadd24d 100644 --- a/SunnyUI/Controls/UIComboBox.cs +++ b/SunnyUI/Controls/UIComboBox.cs @@ -43,6 +43,7 @@ * 2024-10-28: V3.7.2 增加了SelectionChangeCommitted事件,下拉框显示鼠标点击条目时响应 * 2024-11-10: V3.7.2 增加StyleDropDown属性,手动修改Style时设置此属性以修改下拉框主题 * 2024-11-10: V3.7.2 删除ScrollBarColor、ScrollBarBackColor、ScrollBarStyleInherited属性 + * 2025-03-18: V3.8.2 修复过滤下拉框跟随主题配色 ******************************************************************************/ using System; @@ -158,7 +159,10 @@ namespace Sunny.UI if (!FilterItemForm.Visible) { filterForm.Style = StyleDropDown; - if (StyleDropDown != UIStyle.Inherited) filterForm.Style = StyleDropDown; + if (StyleDropDown != UIStyle.Inherited) + filterForm.Style = StyleDropDown; + else + filterForm.Style = UIStyles.Style; FilterItemForm.Show(this, new Size(DropDownWidth < Width ? Width : DropDownWidth, CalcItemFormHeight())); edit.Focus(); } @@ -736,6 +740,7 @@ namespace Sunny.UI } else { + if (StyleDropDown != UIStyle.Inherited) filterForm.Style = StyleDropDown; if (FilterItemForm.Visible) { FilterItemForm.Close(); @@ -957,7 +962,7 @@ namespace Sunny.UI public Color ItemRectColor { get => ListBox.RectColor; - set => ListBox.RectColor = value; + set => FilterListBox.RectColor = ListBox.RectColor = value; } } } \ No newline at end of file