From 7c7e759f441113f864bae9f664e4cbbf973d6706 Mon Sep 17 00:00:00 2001 From: Sunny Date: Sun, 12 Nov 2023 22:41:30 +0800 Subject: [PATCH] =?UTF-8?q?*=20=E9=87=8D=E6=9E=84=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SunnyUI/Controls/UITableLayoutPanel.cs | 13 +------------ SunnyUI/Style/UIStyle.cs | 4 ++-- 2 files changed, 3 insertions(+), 14 deletions(-) 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) {