diff --git a/CHANGELOG.en.md b/CHANGELOG.en.md index f9ffb7e..ddf601e 100644 --- a/CHANGELOG.en.md +++ b/CHANGELOG.en.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 [中文文档](CHANGELOG.md) +## [v2.2.2] - 2025 - 11- 08 + +### ⚙️ Changes + +- Modified the coordinate transfer method for the Canvas container. Child control coordinates are now passed as relative coordinates (with the origin at the top-left corner of the container, obtainable via the `getX`/`getY` interface), instead of the original global coordinates. Child control coordinates can now be set to negative values. +- The example under `examples\register-viewer` has been updated to the latest version, aligning container child controls to use relative coordinates. + +### ✅ Fixes + +- Fixed jittering/bouncing and flickering when resizing the window (left/top edges): + - `WM_SIZING` only clamps the minimum size; `WM_GETMINMAXINFO` sets the window-level minimum tracking size. + - Freezes redrawing during dragging and handles resizing uniformly upon release; `WM_SIZE` only records the new size without interfering with drawing. + - Disabled `WM_ERASEBKGND` background erasing and removed `CS_HREDRAW`/`CS_VREDRAW` to reduce flickering. +- Fixed issues related to dialog boxes: + - Resolved occasional residual functional buttons after closing a dialog. + - Fixed issues where window resizing failed to redraw or displayed a corrupted background when a modal dialog was active. +- Fixed delayed updates of background snapshots for the table control's pagination buttons and page number labels during window changes. + ## [v2.2.1] - 2025-11-04 ==This release is a hotfix for v2.2.0== diff --git a/CHANGELOG.md b/CHANGELOG.md index b0a8cc3..bee759e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,24 @@ StellarX 项目所有显著的变化都将被记录在这个文件中。 [English document](CHANGELOG.en.md) +## [v2.2.2] - 2025 - 11- 08 + +### ⚙️ 变更 + +- Canvas容器坐标传递方式改变,子控件坐标由原来的传递全局坐标改为传递相对坐标(坐标原点为容器的左上角坐标可通过getX/Y接口获得)可以设置子控件坐标为负值 +- examples\register-viewer下的案例已同步修改为最新,同步容器子控件为相对坐标 + +### ✅ 修复 + +- 修复窗口拉伸(左/上边)时的抖动/弹回与闪烁 + - `WM_SIZING` 仅做最小尺寸夹紧;`WM_GETMINMAXINFO` 设置窗口级最小轨迹 + - 拖拽期冻结重绘,松手统一收口;`WM_SIZE` 只记录尺寸不抢绘制 + - 禁用 `WM_ERASEBKGND` 擦背景并移除 `CS_HREDRAW/CS_VREDRAW`,减少闪烁 +- 对话框的相关问题 + - 对话框关闭后概率出现功能按钮残留 + - 模态对话框触发时,窗口拉伸无法重绘或背景错乱 +- 表格控件在窗口变化时其翻页按钮和页码标签背景快照更新不及时的问题 + ## [v2.2.1] - 2025 - 11 - 4 ==此版本为v2.2.0的修复版本== diff --git a/README.en.md b/README.en.md index abf26d0..6a414ed 100644 --- a/README.en.md +++ b/README.en.md @@ -25,22 +25,15 @@ This is a **teaching-grade and tooling-grade** framework that helps developers u ------ -## **🆕 v2.2.1 (Hotfix for v2.2.0)** +## 🆕 v2.2.2 — Stable Release -- Addressed a flickering issue that occurred when using the Canvas and TabControl containers. -- Fixed issues where border remnants and functional buttons could persist after closing a Dialog. +- In the next planned update, control states will synchronize in real-time during window resizing operations. +- Modified the coordinate transfer method for Canvas containers. Child control coordinates are now passed as relative coordinates (with the origin at the top-left corner of the container, obtainable via the `getX`/`getY` interface) instead of global coordinates. Child control coordinates can now be set to negative values. +- The example under `examples\register-viewer` has been updated to the latest version, aligning container child controls to use relative coordinates. +- Addressed issues related to window resizing and dialog boxes as mentioned above. For details, please refer to the [CHANGELOG.en](CHANGELOG.en.md). -## What’s new in v2.2.0 - -- **New TabControl for multi-page tabbed UIs:** With `TabControl`, it’s easy to create a tabbed layout. Tabs can be arranged on the top, bottom, left, or right, and clicking switches the displayed page. Suitable for settings panels and multi-view switching. -- **Enhanced control show/hide and resize responsiveness:** All controls now share a unified interface (`setIsVisible`) to toggle visibility. When a container control is hidden, its child controls automatically hide/show with it. Meanwhile, we introduce `onWindowResize` for controls to respond to window size changes so elements update in sync after resizing, eliminating artifacts or misalignment. -- **Refined text-style mechanism:** The Label control now uses a unified `ControlText` style structure. Developers can easily customize font, color, size, etc. (replacing older interfaces, and more flexible). Button Tooltips also support richer customization and different texts for toggle states. -- **Other improvements:** Dialog management gains de-duplication to prevent identical prompts from popping up repeatedly. Several bug fixes and refresh optimizations further improve stability. - -See `CHANGELOG.md / CHANGELOG.en.md` for the full list. - ------ ## 📦 Project Structure & Design Philosophy diff --git a/README.md b/README.md index b48ccd3..6f8300c 100644 --- a/README.md +++ b/README.md @@ -30,24 +30,14 @@ --- -## 🆕v2.2.1(v2.2.0修复版) +## 🆕v2.2.2 ——稳定版本 -- 解决了使用Canvas和TabControl容器时,出现频闪问题 +- 预计下次版本更新,将同步窗口拉伸时,控件同步更新状态 -- 修复了Dialog对话框关闭时概率出边边框残留和功能按钮残留问题 - - 详情参考[更新日志](CHANGELOG.md) - - - -## V2.2.0 有何变化 - -- **新增 TabControl 控件,实现多页面选项卡界面:** 通过 `TabControl` 可以轻松创建选项卡式布局,支持页签在上下左右排列、点击切换显示不同内容页面。适用于设置面板、多视图切换等场景。 -- **控件显隐与布局响应能力增强:** 现在所有控件都可以使用统一接口动态隐藏或显示(`setIsVisible`),容器控件隐藏时其内部子控件会自动随之隐藏/显示。与此同时,引入控件对窗口尺寸变化的响应机制(`onWindowResize`),窗口拉伸后界面各元素可协调更新,杜绝拉伸过程中出现残影或错位。 -- **文本样式机制完善:** Label 控件改用统一的文本样式结构 `ControlText`,开发者可方便地设置字体、颜色、大小等属性来定制 Label 的外观(替代旧接口,更加灵活)。Button 的 Tooltip 提示也支持更丰富的定制和针对切换状态的不同提示文本。 -- **其他改进:** 框架底层的对话框管理增加了防重复弹出相同提示的机制,修复了一些细节 Bug 并优化了刷新效率,进一步提升了稳定性。 - -详见 `CHANGELOG.md / CHANGELOG.en.md` 获取完整更新列表。 +- Canvas容器坐标传递方式改变,子控件坐标由原来的传递全局坐标改为传递相对坐标(坐标原点为容器的左上角坐标可通过getX/Y接口获得)可以设置子控件坐标为负值 +- examples\register-viewer下的案例已同步修改为最新,同步容器子控件为相对坐标 +- 对于窗口拉伸和对话框问题进行了修复 +- 详情参考[更新日志](CHANGELOG.md) --- diff --git a/examples/register-viewer/main.cpp b/examples/register-viewer/main.cpp index ecdd043..3211ca8 100644 --- a/examples/register-viewer/main.cpp +++ b/examples/register-viewer/main.cpp @@ -7,12 +7,12 @@ auto blackColor = RGB(202, 255, 255); char initData[33] = "00000000000000000000000000000000";//初始数据 bool gSigned = false; //是否为有符号数 -void main() -{ - Window mainWindow(700,500,NULL,RGB(255,255,255), "寄存器查看工具 V1.0——我在人间做废物 (同类工具定制:3150131407(Q / V))"); - +int main() +{ + Window mainWindow(700, 510, NULL, RGB(255, 255, 255), "寄存器查看工具 V1.0——我在人间做废物 (同类工具定制:3150131407(Q / V))"); + //选择区控件 - auto selectionAreaLabel = std::make_unique