diff --git a/doc/wiki/README_EmojiFluentFlat.md b/doc/wiki/README_EmojiFluentFlat.md new file mode 100644 index 00000000..363428f2 --- /dev/null +++ b/doc/wiki/README_EmojiFluentFlat.md @@ -0,0 +1,53 @@ +# AntdUI Emoji 资源库 + +## 📦 简介 + +AntdUI Emoji 资源库是基于 Microsoft Fluent UI Emoji 设计的一套现代化 Emoji 图标集,为 AntdUI WinForm 应用提供丰富的表情符号支持,打破传统桌面应用的黑白界限,增加界面趣味性和表现力。 + +## 🔗 官方仓库 + +Emoji 资源来源于 Microsoft 官方 Fluent UI Emoji 仓库: +https://github.com/microsoft/fluentui-emoji + +## 🚀 使用方法 + +在应用程序初始化之前,即可通过以下代码将 Fluent Flat Emoji 资源设置到 AntdUI 中: + +```csharp +AntdUI.SvgDb.Emoji = AntdUI.FluentFlat.Emoji; +``` + +## 📋 注意事项 + +1. 确保在应用程序启动初期就设置 Emoji 资源,建议在 `Main` 方法或应用程序初始化阶段执行 +2. 设置后,所有 AntdUI 控件都会自动使用新的 Emoji 资源 +3. 可以根据需要随时切换不同的 Emoji 资源库 +4. Emoji 资源较大,会增加应用程序的内存占用,建议根据实际需求选择是否使用 + +--- + +# AntdUI Emoji Resource Library + +## 📦 Introduction + +AntdUI Emoji Resource Library is a modern Emoji icon set based on Microsoft Fluent UI Emoji design, providing rich emoji support for AntdUI WinForm applications. It breaks the black and white boundaries of traditional desktop applications, adding fun and expressiveness to the interface. + +## 🔗 Official Repository + +Emoji resources are sourced from Microsoft's official Fluent UI Emoji repository: +https://github.com/microsoft/fluentui-emoji + +## 🚀 Usage + +Before application initialization, you can set the Fluent Flat Emoji resources to AntdUI through the following code: + +```csharp +AntdUI.SvgDb.Emoji = AntdUI.FluentFlat.Emoji; +``` + +## 📋 Notes + +1. Make sure to set the Emoji resources at the beginning of the application startup, it is recommended to execute in the `Main` method or application initialization phase +2. After setting, all AntdUI controls will automatically use the new Emoji resources +3. You can switch between different Emoji resource libraries at any time as needed +4. Emoji resources are large and will increase the memory usage of the application, it is recommended to choose whether to use it according to actual needs \ No newline at end of file diff --git a/doc/wiki/en/UpdateLog.md b/doc/wiki/en/UpdateLog.md index 0e1c2e2c..2d0dc135 100644 --- a/doc/wiki/en/UpdateLog.md +++ b/doc/wiki/en/UpdateLog.md @@ -1,5 +1,24 @@ [Home](Home.md)・[UpdateLog](UpdateLog.md)・[Config](Config.md)・[Theme](Theme.md) +### `2.2.14` 2026-01-23 + +- ➕ ColorPicker static method +- ➕ ColorPicker Presets preset colors +- ➕ Config EmojiEnabled +- ➕ ControlPopup Pause Close +- ➕ Tabs tags vertical mode Rotate +- ➕ Chat alignment color card +- ➕ Color card automatically adapts to dark colors +- ➕ Enrich TooltipConfig settings +- ✍️ Table binding empty collection insertion data not displayed +- ✍️ Correct ColorMode to determine brightness +- ✍️ Tabs only have abnormal layout of tags under the icon +- ✍️ Calendar large font misalignment +- ✍️ Align font calculation cache +- ✍️ Net48 DPI perception +- ✍️ Text spaces are missing +- ✍️ Calendar open in multiple languages + ### `2.2.13` 2026-01-19 - ➕ Config ShadowSize diff --git a/doc/wiki/zh/UpdateLog.md b/doc/wiki/zh/UpdateLog.md index b72346bd..0ccd4646 100644 --- a/doc/wiki/zh/UpdateLog.md +++ b/doc/wiki/zh/UpdateLog.md @@ -1,5 +1,24 @@ [首页](Home.md)・[更新日志](UpdateLog.md)・[配置](Config.md)・[主题](Theme.md) +### `2.2.14` 2026-01-23 + +- ➕ ColorPicker 静态方法 +- ➕ ColorPicker Presets 预设颜色 +- ➕ Config EmojiEnabled +- ➕ ControlPopup 暂停关闭 +- ➕ Tabs 标签竖直模式 Rotate +- ➕ Chat 对齐色卡 +- ➕ 色卡自动适配暗色 +- ➕ 丰富 TooltipConfig 设置 +- ✍️ Table 绑定空集合插入数据不显示 +- ✍️ 修正 ColorMode 判断亮度 +- ✍️ Tabs 仅图标下标签布局异常 +- ✍️ Calendar 大字体错位 +- ✍️ 对齐字体计算缓存 +- ✍️ net48 DPI 感知 +- ✍️ 文本空格丢失 +- ✍️ 日历开放多语言 + ### `2.2.13` 2026-01-19 - ➕ Config ShadowSize diff --git a/example/ChatUI/Main.Designer.cs b/example/ChatUI/Main.Designer.cs index 6b8bc064..715057b9 100644 --- a/example/ChatUI/Main.Designer.cs +++ b/example/ChatUI/Main.Designer.cs @@ -29,12 +29,17 @@ namespace ChatUI AntdUI.Chat.MsgItem msgItem3 = new AntdUI.Chat.MsgItem(); AntdUI.Chat.MsgItem msgItem4 = new AntdUI.Chat.MsgItem(); win = new AntdUI.PageHeader(); + colorTheme = new AntdUI.ColorPicker(); + btn_mode = new AntdUI.Button(); msgList = new AntdUI.Chat.MsgList(); chatList = new AntdUI.Chat.ChatList(); + win.SuspendLayout(); SuspendLayout(); // // win // + win.Controls.Add(colorTheme); + win.Controls.Add(btn_mode); win.Dock = DockStyle.Top; win.Location = new Point(0, 0); win.Name = "win"; @@ -45,25 +50,51 @@ namespace ChatUI win.TabIndex = 0; win.Text = "AntdUI GPT"; // + // colorTheme + // + colorTheme.Dock = DockStyle.Right; + colorTheme.Location = new Point(529, 0); + colorTheme.Name = "colorTheme"; + colorTheme.Padding = new Padding(4); + colorTheme.Size = new Size(36, 36); + colorTheme.TabIndex = 10; + colorTheme.ValueChanged += colorTheme_ValueChanged; + // + // btn_mode + // + btn_mode.Dock = DockStyle.Right; + btn_mode.Ghost = true; + btn_mode.IconSvg = "SunOutlined"; + btn_mode.Location = new Point(565, 0); + btn_mode.Name = "btn_mode"; + btn_mode.Radius = 0; + btn_mode.Size = new Size(36, 36); + btn_mode.TabIndex = 9; + btn_mode.ToggleIconSvg = "MoonOutlined"; + btn_mode.WaveSize = 0; + btn_mode.Click += btn_mode_Click; + // // msgList // - msgList.BackColor = Color.White; msgList.Dock = DockStyle.Left; msgItem1.Icon = Properties.Resources.aduskin; msgItem1.Name = "WPF / Flutter UI"; msgItem1.Text = "AduSkin:我初三就上班啦"; msgItem1.Time = "10:24"; + msgItem2.Badge = "99+"; msgItem2.Count = 999; msgItem2.Icon = Properties.Resources.av2; msgItem2.Name = "宝宝"; msgItem2.Text = "今天给你买一束花"; msgItem2.Time = "13:14"; + msgItem3.Badge = "5"; msgItem3.Count = 5; msgItem3.Icon = Properties.Resources.antd; msgItem3.Name = "AntdUI"; msgItem3.Select = true; msgItem3.Text = "Tom:❤️AntDesign设计语言的Winform界面库"; msgItem3.Time = "前天"; + msgItem4.Badge = ""; msgItem4.Count = 1; msgItem4.Icon = Properties.Resources.av1; msgItem4.Name = "Tom"; @@ -98,6 +129,7 @@ namespace ChatUI Name = "Main"; StartPosition = FormStartPosition.CenterScreen; Text = "ChatUI"; + win.ResumeLayout(false); ResumeLayout(false); } @@ -106,5 +138,7 @@ namespace ChatUI private AntdUI.PageHeader win; private AntdUI.Chat.MsgList msgList; private AntdUI.Chat.ChatList chatList; + private AntdUI.ColorPicker colorTheme; + private AntdUI.Button btn_mode; } } diff --git a/example/ChatUI/Main.cs b/example/ChatUI/Main.cs index 426cd571..62951b63 100644 --- a/example/ChatUI/Main.cs +++ b/example/ChatUI/Main.cs @@ -4,6 +4,7 @@ // GitHub: https://github.com/AntdUI/AntdUI // GitCode: https://gitcode.com/AntdUI/AntdUI +using AntdUI; using System.Text; namespace ChatUI @@ -13,7 +14,28 @@ namespace ChatUI public Main() { InitializeComponent(); - msgList.ItemClick += MsgList_ItemClick; + Theme().Call(dark => msgList.BackColor = AntdUI.Style.Db.BgBase); + msgList.ItemClick += msgList_ItemClick; + colorTheme.Presets = new Color[] { + "#f44336".ToColor(), + "#e91e63".ToColor(), + "#9c27b0".ToColor(), + "#673ab7".ToColor(), + "#3f51b5".ToColor(), + "#2196f3".ToColor(), + "#03a9f4".ToColor(), + "#00bcd4".ToColor(), + "#009688".ToColor(), + "#4caf50".ToColor(), + "#cddc39".ToColor(), + "#ffeb3b".ToColor(), + "#ffc107".ToColor(), + "#ff9800".ToColor(), + "#ff5722".ToColor(), + "#795548".ToColor(), + "#9e9e9e".ToColor(), + "#607d8b".ToColor() + }; } protected override void OnLoad(EventArgs e) @@ -28,9 +50,9 @@ namespace ChatUI chatList.AddToBottom(new AntdUI.Chat.TextChatItem("完美主义 🥣💲🐖👚", Properties.Resources.av1, "Tom") { Me = true }); Thread.Sleep(700); - if (File.Exists("../../../../doc/pre/banner.png") && File.Exists("../../../../src/logo.png")) + if (File.Exists(BasePath + "doc/pre/banner.png") && File.Exists(BasePath + "src/logo.png")) { - chatList.AddToBottom(new AntdUI.Chat.TextChatItem("🦄 Winform interface library based on the Ant Design\n" + "data:image/png;base64," + Convert.ToBase64String(File.ReadAllBytes("../../../../doc/pre/banner.png")), (Bitmap)Image.FromFile("../../../../src/logo.png"), "AntdUI")); + chatList.AddToBottom(new AntdUI.Chat.TextChatItem("🦄 Winform interface library based on the Ant Design\n" + "data:image/png;base64," + Convert.ToBase64String(File.ReadAllBytes(BasePath + "doc/pre/banner.png")), (Bitmap)Image.FromFile(BasePath + "src/logo.png"), "AntdUI")); Thread.Sleep(700); } @@ -124,7 +146,7 @@ namespace ChatUI }); } - private void MsgList_ItemClick(object sender, AntdUI.MsgItemClickEventArgs e) + private void msgList_ItemClick(object sender, AntdUI.MsgItemClickEventArgs e) { if (e.Button == MouseButtons.Right) { @@ -139,5 +161,18 @@ namespace ChatUI }); } } + + static string BasePath = "../../../../"; + + private void colorTheme_ValueChanged(object sender, AntdUI.ColorEventArgs e) + { + AntdUI.Style.SetPrimary(e.Value); + Refresh(); + } + + private void btn_mode_Click(object sender, EventArgs e) + { + AntdUI.Config.IsDark = !AntdUI.Config.IsDark; + } } } \ No newline at end of file diff --git a/example/ChatUI/Program.cs b/example/ChatUI/Program.cs index bde807e7..be11ed72 100644 --- a/example/ChatUI/Program.cs +++ b/example/ChatUI/Program.cs @@ -15,7 +15,8 @@ namespace ChatUI static void Main() { AntdUI.Config.TextRenderingHighQuality = true; - Application.SetHighDpiMode(HighDpiMode.SystemAware); + AntdUI.Config.Theme().Header("f3f3f3", "111111").Light("f7f7f7").Dark("202020").FormBorderColor(); + Application.SetHighDpiMode(HighDpiMode.PerMonitorV2); AntdUI.SvgDb.Emoji = AntdUI.FluentFlat.Emoji; Application.Run(new Main()); } diff --git a/example/ChatUI/Properties/Resources.Designer.cs b/example/ChatUI/Properties/Resources.Designer.cs index 3bdf4118..42bd86dd 100644 --- a/example/ChatUI/Properties/Resources.Designer.cs +++ b/example/ChatUI/Properties/Resources.Designer.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // 此代码由工具生成。 // 运行时版本:4.0.30319.42000 @@ -19,7 +19,7 @@ namespace ChatUI.Properties { // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen // (以 /str 作为命令选项),或重新生成 VS 项目。 - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { diff --git a/example/ChatUI/Properties/Resources.resx b/example/ChatUI/Properties/Resources.resx index 7b8d8546..15843ad2 100644 --- a/example/ChatUI/Properties/Resources.resx +++ b/example/ChatUI/Properties/Resources.resx @@ -1,4 +1,4 @@ - + diff --git a/example/Demo/Controls/Signal.Designer.cs b/example/Demo/Controls/Signal.Designer.cs index ede426a2..325f81e8 100644 --- a/example/Demo/Controls/Signal.Designer.cs +++ b/example/Demo/Controls/Signal.Designer.cs @@ -99,9 +99,9 @@ namespace Demo.Controls // button2.AutoSizeMode = AntdUI.TAutoSize.Width; button2.LocalizationText = "Signal.Subtract"; - button2.Location = new Point(59, 7); + button2.Location = new Point(54, 7); button2.Name = "button2"; - button2.Size = new Size(50, 38); + button2.Size = new Size(45, 38); button2.TabIndex = 10; button2.Text = "减"; button2.Type = AntdUI.TTypeMini.Success; @@ -113,7 +113,7 @@ namespace Demo.Controls button1.LocalizationText = "Signal.Add"; button1.Location = new Point(3, 7); button1.Name = "button1"; - button1.Size = new Size(50, 38); + button1.Size = new Size(45, 38); button1.TabIndex = 9; button1.Text = "加"; button1.Type = AntdUI.TTypeMini.Primary; diff --git a/example/Demo/Controls/Signal.resx b/example/Demo/Controls/Signal.resx index 8b2ff64a..4edf53f8 100644 --- a/example/Demo/Controls/Signal.resx +++ b/example/Demo/Controls/Signal.resx @@ -1,4 +1,4 @@ - +