From b17ad7f434d4a19961975216a5e4e6d93c82b36e Mon Sep 17 00:00:00 2001 From: Mentalflow <312902918@qq.com> Date: Sun, 20 Aug 2023 13:49:54 +0800 Subject: [PATCH] RibbonSpinBox: Fix issue where text may be obscured. Insufficient padding on the left side of LineEdit can cause text to be obscured by icons. --- lib_source/qml/RibbonSpinBox.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib_source/qml/RibbonSpinBox.qml b/lib_source/qml/RibbonSpinBox.qml index 3027bfe..9dbfd19 100644 --- a/lib_source/qml/RibbonSpinBox.qml +++ b/lib_source/qml/RibbonSpinBox.qml @@ -45,8 +45,8 @@ SpinBox { topPadding: 2 bottomPadding: 2 - leftPadding: 10 + icon.visible ? icon.contentWidth + padding*2 : 0 - rightPadding: (10 + clear_btn.visible ? clear_btn.width + padding*2 : 0) + up.indicator.width + leftPadding: icon.visible ? icon.contentWidth + padding*2 : 10 + rightPadding: (clear_btn.visible ? clear_btn.width + padding*2 : 10) + up.indicator.width readOnly: !control.editable validator: control.validator