* UIComboBox: 修复过滤下拉框跟随主题配色

This commit is contained in:
Sunny 2025-03-18 22:36:33 +08:00
parent 4f75336ed5
commit b9c87e15e8

View File

@ -43,6 +43,7 @@
* 2024-10-28: V3.7.2 SelectionChangeCommitted事件 * 2024-10-28: V3.7.2 SelectionChangeCommitted事件
* 2024-11-10: V3.7.2 StyleDropDown属性Style时设置此属性以修改下拉框主题 * 2024-11-10: V3.7.2 StyleDropDown属性Style时设置此属性以修改下拉框主题
* 2024-11-10: V3.7.2 ScrollBarColorScrollBarBackColorScrollBarStyleInherited属性 * 2024-11-10: V3.7.2 ScrollBarColorScrollBarBackColorScrollBarStyleInherited属性
* 2025-03-18: V3.8.2
******************************************************************************/ ******************************************************************************/
using System; using System;
@ -158,7 +159,10 @@ namespace Sunny.UI
if (!FilterItemForm.Visible) if (!FilterItemForm.Visible)
{ {
filterForm.Style = StyleDropDown; 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())); FilterItemForm.Show(this, new Size(DropDownWidth < Width ? Width : DropDownWidth, CalcItemFormHeight()));
edit.Focus(); edit.Focus();
} }
@ -736,6 +740,7 @@ namespace Sunny.UI
} }
else else
{ {
if (StyleDropDown != UIStyle.Inherited) filterForm.Style = StyleDropDown;
if (FilterItemForm.Visible) if (FilterItemForm.Visible)
{ {
FilterItemForm.Close(); FilterItemForm.Close();
@ -957,7 +962,7 @@ namespace Sunny.UI
public Color ItemRectColor public Color ItemRectColor
{ {
get => ListBox.RectColor; get => ListBox.RectColor;
set => ListBox.RectColor = value; set => FilterListBox.RectColor = ListBox.RectColor = value;
} }
} }
} }