From 39fb76484ec0310162fc9f0510fc382bea75d79a Mon Sep 17 00:00:00 2001 From: Mentalflow <312902918@qq.com> Date: Thu, 22 May 2025 16:20:55 +0800 Subject: [PATCH] RibbonBusyBar: Add color property. --- lib_source/qml/Qt5/RibbonBusyBar.qml | 3 ++- lib_source/qml/Qt6/RibbonBusyBar.qml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib_source/qml/Qt5/RibbonBusyBar.qml b/lib_source/qml/Qt5/RibbonBusyBar.qml index 1ad3cc3..be0fafc 100644 --- a/lib_source/qml/Qt5/RibbonBusyBar.qml +++ b/lib_source/qml/Qt5/RibbonBusyBar.qml @@ -12,6 +12,7 @@ BusyIndicator { implicitContentHeight + topPadding + bottomPadding) padding: 2 + property color color: RibbonTheme.isDarkMode ? "white" : "black" property real barWidth: 200 property real barHeight: 4 property real indicatorWidth: 4 @@ -44,7 +45,7 @@ BusyIndicator { delegate: Rectangle { width: indicatorWidth height: indicatorHeight - color: RibbonTheme.isDarkMode ? "white" : "black" + color: control.color x: -(index + 1) * indicatorWidth y: (barHeight.height / 2 - height / 2) radius: Math.min(width,height)/2 diff --git a/lib_source/qml/Qt6/RibbonBusyBar.qml b/lib_source/qml/Qt6/RibbonBusyBar.qml index 48459ac..86bd218 100644 --- a/lib_source/qml/Qt6/RibbonBusyBar.qml +++ b/lib_source/qml/Qt6/RibbonBusyBar.qml @@ -12,6 +12,7 @@ BusyIndicator { implicitContentHeight + topPadding + bottomPadding) padding: 2 + property color color: RibbonTheme.isDarkMode ? "white" : "black" property real barWidth: 200 property real barHeight: 4 property real indicatorWidth: 4 @@ -44,7 +45,7 @@ BusyIndicator { delegate: Rectangle { width: indicatorWidth height: indicatorHeight - color: RibbonTheme.isDarkMode ? "white" : "black" + color: control.color x: -(index + 1) * indicatorWidth y: (barHeight.height / 2 - height / 2) radius: Math.min(width,height)/2