diff --git a/SunnyUI/Controls/UITableLayoutPanel.cs b/SunnyUI/Controls/UITableLayoutPanel.cs index a3a640c4..c03e5700 100644 --- a/SunnyUI/Controls/UITableLayoutPanel.cs +++ b/SunnyUI/Controls/UITableLayoutPanel.cs @@ -18,6 +18,7 @@ * * 2021-07-18: V3.0.5 增加文件说明 * 2021-07-18: V3.0.5 更新了放在TableLayoutPanel里控件的自定义颜色问题 + * 2023-11-12: V3.5.2 重构主题 ******************************************************************************/ using System.ComponentModel; @@ -42,18 +43,6 @@ namespace Sunny.UI this.SetDPIScaleFont(DefaultFontSize); } - protected override void OnControlAdded(ControlEventArgs e) - { - base.OnControlAdded(e); - - if (e.Control is IStyleInterface ctrl) - { - if (!ctrl.StyleCustomMode) ctrl.Style = Style; - } - - UIStyleHelper.SetRawControlStyle(e, Style); - } - /// /// 自定义主题风格 /// diff --git a/SunnyUI/Style/UIStyle.cs b/SunnyUI/Style/UIStyle.cs index d72a3c88..d5f11c80 100644 --- a/SunnyUI/Style/UIStyle.cs +++ b/SunnyUI/Style/UIStyle.cs @@ -439,10 +439,10 @@ namespace Sunny.UI } if (obj is UIPage) continue; - if (obj is UITableLayoutPanel) continue; + //if (obj is UITableLayoutPanel) continue; //if (obj is UIFlowLayoutPanel) continue; //if (obj is UIUserControl) continue; - if (obj is TableLayoutPanel) continue; + //if (obj is TableLayoutPanel) continue; if (obj.Controls.Count > 0) {