From 48a8b684f549494debe60a4e5f800639aacbbe1b Mon Sep 17 00:00:00 2001 From: shuttle slave Date: Sat, 14 Nov 2026 03:33:57 +0800 Subject: [PATCH] fix: add missing spinBox indicatorWidth and indicatorSpacing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Root cause: FlowStyle.qml spinBox QtObject never defined indicatorWidth/indicatorSpacing, causing SpinBoxIndicator and SpinBox to read undefined values for button width and spacing 2. Fix: add indicatorWidth: 24 (matches indicator.width) and indicatorSpacing: 0 to both Qt6 and Qt5 FlowStyle.qml 3. Impact: SpinBox indicator buttons render at correct width with centered icons; no effect on other controls Log: Fix SpinBox indicator button icon alignment issue Influence: 1. Test SpinBox indicator button icon is centered 2. Test SpinBox up/down buttons display correctly 3. Verify no regression on other Style properties fix: 补充 spinBox 缺失的 indicatorWidth 和 indicatorSpacing 属性 1. 根因:FlowStyle.qml 中 spinBox QtObject 从未定义 indicatorWidth/indicatorSpacing 属性,导致 SpinBoxIndicator 和 SpinBox 读取到 undefined 值 2. 方案:在 Qt6 和 Qt5 的 FlowStyle.qml 中添加 indicatorWidth: 24 (与 indicator.width 一致)和 indicatorSpacing: 0 3. 影响:SpinBox 指示器按钮按正确宽度渲染,图标居中显示; 不影响其他控件 Log: 修复 SpinBox 指示器按钮图标偏左问题 Influence: 1. 测试 SpinBox 指示器按钮图标居中显示 2. 测试 SpinBox 上下按钮显示正常 3. 验证其他 Style 属性无回归 PMS: BUG-341599 --- qt6/src/qml/FlowStyle.qml | 2 ++ src/qml/FlowStyle.qml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/qt6/src/qml/FlowStyle.qml b/qt6/src/qml/FlowStyle.qml index 7c089f110..853fc3e4f 100644 --- a/qt6/src/qml/FlowStyle.qml +++ b/qt6/src/qml/FlowStyle.qml @@ -559,6 +559,8 @@ QtObject { property int width : 300 property int height: 36 property int spacing: 10 + property int indicatorWidth: 24 + property int indicatorSpacing: 0 property QtObject indicator: QtObject { property int width: 24 diff --git a/src/qml/FlowStyle.qml b/src/qml/FlowStyle.qml index f47022fbf..b7d231cb6 100644 --- a/src/qml/FlowStyle.qml +++ b/src/qml/FlowStyle.qml @@ -516,6 +516,8 @@ QtObject { property int width : 300 property int height: 36 property int spacing: 10 + property int indicatorWidth: 24 + property int indicatorSpacing: 0 property QtObject indicator: QtObject { property int width: 24