Make accent colour of NCTabButton in file details follow user accent colour
authorClaudio Cambra <claudio.cambra@nextcloud.com>
Tue, 15 Aug 2023 07:00:19 +0000 (15:00 +0800)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Tue, 22 Aug 2023 16:08:58 +0000 (18:08 +0200)
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
src/gui/filedetails/FileDetailsPage.qml
src/gui/filedetails/FileDetailsView.qml
src/gui/filedetails/NCTabButton.qml
src/gui/tray/Window.qml

index 2868ad67baf3cf0982874e5aa2e4c2ada6bcf529..45f87141459144307dc977eb9a4f255e4ee3c916 100644 (file)
@@ -38,6 +38,7 @@ Page {
     property StackView rootStackView: StackView {}
     property bool showCloseButton: false
     property bool backgroundsVisible: true
+    property color accentColor: Style.ncBlue
 
     property FileDetails fileDetails: FileDetails {
         id: fileDetails
@@ -227,6 +228,7 @@ Page {
             NCTabButton {
                 svgCustomColorSource: "image://svgimage-custom-color/activity.svg"
                 text: qsTr("Activity")
+                accentColor: root.accentColor
                 checked: swipeView.currentIndex === fileActivityView.swipeIndex
                 onClicked: swipeView.currentIndex = fileActivityView.swipeIndex
             }
@@ -236,6 +238,7 @@ Page {
                 height: visible ? implicitHeight : 0
                 svgCustomColorSource: "image://svgimage-custom-color/share.svg"
                 text: qsTr("Sharing")
+                accentColor: root.accentColor
                 checked: swipeView.currentIndex === shareViewLoader.swipeIndex
                 onClicked: swipeView.currentIndex = shareViewLoader.swipeIndex
                 visible: root.fileDetails.sharingAvailable
index 93e130e0534db4db723a9d8bdd502c783b064ae4..5fae863d4f6d012aea59e976f28be772fbe7545d 100644 (file)
@@ -27,6 +27,7 @@ StackView {
     property alias accountState: fileDetailsPage.accountState
     property alias localPath: fileDetailsPage.localPath
     property alias showCloseButton: fileDetailsPage.showCloseButton
+    property alias accentColor: fileDetailsPage.accentColor
     property bool backgroundsVisible: true
 
     background: Rectangle {
index dfd31faafd71c0a1d1a5217dae6ac7ecbcc1fcaf..8c6c7426ff5eef1e898201d559f4d82821873c52 100644 (file)
@@ -25,6 +25,7 @@ TabButton {
     id: tabButton
 
     property string svgCustomColorSource: ""
+    property color accentColor: Style.ncBlue
 
     padding: Style.smallSpacing
     background: Rectangle {
@@ -82,7 +83,7 @@ TabButton {
             implicitWidth: textWidth + Style.standardSpacing * 2
             implicitHeight: 2
 
-            color: tabButton.checked ? Style.ncBlue : tabButton.hovered ? palette.highlight : "transparent"
+            color: tabButton.checked ? tabButton.accentColor : tabButton.hovered ? palette.highlight : "transparent"
         }
     }
 }
index 60ec7748eacd09abe60502a808d039d42f0c432c..adbf1480ffdb39b05e8bd1a48326669960bf604a 100644 (file)
@@ -231,6 +231,7 @@ ApplicationWindow {
                 height: parent.height\r
 \r
                 backgroundsVisible: false\r
+                accentColor: Style.currentUserHeaderColor\r
                 accountState: fileDetailsDrawer.folderAccountState\r
                 localPath: fileDetailsDrawer.fileLocalPath\r
                 showCloseButton: true\r