From fab03f236972c8568ab4835727e1dc708072c06b Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Tue, 19 Nov 2024 11:07:04 +0800 Subject: [PATCH] Give sync progress bar expected fill colour Signed-off-by: Claudio Cambra f p Signed-off-by: Claudio Cambra --- src/gui/tray/MainWindow.qml | 1 + src/gui/tray/NCProgressBar.qml | 5 ++++- src/gui/tray/SyncStatus.qml | 2 ++ theme/Style/Style.qml | 1 - 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gui/tray/MainWindow.qml b/src/gui/tray/MainWindow.qml index 1b74eb0b1..f14fa4928 100644 --- a/src/gui/tray/MainWindow.qml +++ b/src/gui/tray/MainWindow.qml @@ -708,6 +708,7 @@ ApplicationWindow { SyncStatus { id: syncStatus + accentColor: Style.accentColor visible: !trayWindowMainItem.isUnifiedSearchActive anchors.top: trayWindowUnifiedSearchInputContainer.bottom diff --git a/src/gui/tray/NCProgressBar.qml b/src/gui/tray/NCProgressBar.qml index 93b4d771c..b86d0faf3 100644 --- a/src/gui/tray/NCProgressBar.qml +++ b/src/gui/tray/NCProgressBar.qml @@ -16,9 +16,12 @@ import QtQuick import QtQuick.Controls import Style +// TODO: the current style does not support customization of this control ProgressBar { id: control + property color fillColor: Style.ncBlue + background: Rectangle { implicitWidth: Style.progressBarWidth implicitHeight: Style.progressBarBackgroundHeight @@ -36,7 +39,7 @@ ProgressBar { width: control.visualPosition * parent.width height: parent.height radius: Style.progressBarRadius - color: palette.dark + color: control.fillColor border.color: palette.dark border.width: Style.progressBarContentBorderWidth } diff --git a/src/gui/tray/SyncStatus.qml b/src/gui/tray/SyncStatus.qml index e30c6eb63..b482c5586 100644 --- a/src/gui/tray/SyncStatus.qml +++ b/src/gui/tray/SyncStatus.qml @@ -10,6 +10,7 @@ RowLayout { id: root property alias model: syncStatus + property color accentColor: Style.ncBlue spacing: Style.trayHorizontalMargin @@ -69,6 +70,7 @@ RowLayout { sourceComponent: NCProgressBar { id: syncProgressBar value: syncStatus.syncProgress + fillColor: root.accentColor } } diff --git a/theme/Style/Style.qml b/theme/Style/Style.qml index 5e8f83a1c..04dcd57dc 100644 --- a/theme/Style/Style.qml +++ b/theme/Style/Style.qml @@ -185,7 +185,6 @@ QtObject { property int progressBarRadius: 4 property int progressBarContentBorderWidth: 1 property int progressBarBackgroundBorderWidth: 1 - property color progressBarContentColor: ncBlue property int newActivitiesButtonWidth: 150 property int newActivitiesButtonHeight: 40