Fix tray header light/dark theme.
authorCamila Ayres <hello@camilasan.com>
Wed, 11 Sep 2024 12:30:15 +0000 (14:30 +0200)
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>
Fri, 13 Sep 2024 11:40:45 +0000 (11:40 +0000)
Signed-off-by: Camila Ayres <hello@camilasan.com>
src/gui/tray/TrayFoldersMenuButton.qml
src/gui/tray/Window.qml
src/gui/tray/activitylistmodel.cpp

index 85a930f34cdc1b2d79cba8db2d0ea465b3c13d05..a2197c7c84a1327f8c3f1352505e77f2e81be467 100644 (file)
@@ -114,7 +114,7 @@ HeaderButton {
 
                 cache: true
 
-                source: "image://svgimage-custom-color/folder.svg/"
+                source: "image://svgimage-custom-color/folder.svg/" + palette.windowText
                 sourceSize {
                     width: imageWidth
                     height: imageHeight
@@ -144,7 +144,7 @@ HeaderButton {
 
                     cache: true
 
-                    source: "image://svgimage-custom-color/caret-down.svg/"
+                    source: "image://svgimage-custom-color/caret-down.svg/" + palette.windowText
                     sourceSize {
                         width: openLocalFolderButtonCaretIconLoader.imageWidth
                         height: openLocalFolderButtonCaretIconLoader.imageHeight
@@ -208,9 +208,9 @@ HeaderButton {
                         subline: model.modelData.parentPath
                         width: foldersMenuListView.width
                         height: Style.standardPrimaryButtonHeight
-                        backgroundIconSource: "image://svgimage-custom-color/folder.svg/"
+                        backgroundIconSource: "image://svgimage-custom-color/folder.svg/" + palette.windowText
                         iconSource: isGroupFolder
-                                    ? "image://svgimage-custom-color/account-group.svg/"
+                                    ? "image://svgimage-custom-color/account-group.svg/" + palette.windowText
                                     : ""
 
                         onTriggered: {
index ccb192781597a18026628e14b10645b3c0006958..f1ac084f0923e2facfc4a5b8195fc5a95a9de0c7 100644 (file)
@@ -505,20 +505,15 @@ ApplicationWindow {
                             }\r
                         }\r
 \r
-                        ColorOverlay {\r
-                            cached: true\r
-                            width: source.width\r
-                            height: source.height\r
-                            source: Image {\r
-                                Layout.alignment: Qt.AlignRight\r
-                                verticalAlignment: Qt.AlignCenter\r
-                                Layout.margins: Style.accountDropDownCaretMargin\r
-                                source:  "image://svgimage-custom-color/caret-down.svg/"\r
-                                sourceSize.width: Style.accountDropDownCaretSize\r
-                                sourceSize.height: Style.accountDropDownCaretSize\r
-                                Accessible.role: Accessible.PopupMenu\r
-                                Accessible.name: qsTr("Account switcher and settings menu")\r
-                            }\r
+                        Image {\r
+                            Layout.alignment: Qt.AlignRight\r
+                            verticalAlignment: Qt.AlignCenter\r
+                            Layout.margins: Style.accountDropDownCaretMargin\r
+                            source:  "image://svgimage-custom-color/caret-down.svg/" + palette.windowText\r
+                            sourceSize.width: Style.accountDropDownCaretSize\r
+                            sourceSize.height: Style.accountDropDownCaretSize\r
+                            Accessible.role: Accessible.PopupMenu\r
+                            Accessible.name: qsTr("Account switcher and settings menu")\r
                         }\r
                     }\r
                 }\r
@@ -564,7 +559,7 @@ ApplicationWindow {
 \r
                 HeaderButton {\r
                     id: trayWindowAppsButton\r
-                    icon.source: "image://svgimage-custom-color/more-apps.svg/"\r
+                    icon.source: "image://svgimage-custom-color/more-apps.svg/" + palette.windowText\r
 \r
                     onClicked: {\r
                         if(appsMenuListView.count <= 0) {\r
@@ -615,6 +610,7 @@ ApplicationWindow {
                                     text: model.appName\r
                                     font.pixelSize: Style.topLinePixelSize\r
                                     icon.source: model.appIconUrl\r
+                                    icon.color: palette.windowText\r
                                     onTriggered: UserAppsModel.openAppUrl(appUrl)\r
                                     hoverEnabled: true\r
                                     Accessible.role: Accessible.MenuItem\r
index d200ecf7cb8c859b0686cb212b1f228334beff8d..c35043807223decffa0768f74a0e2e0a8a8c2b47 100644 (file)
@@ -226,9 +226,9 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const
     };
 
     const auto generateIconPath = [&]() {
-        auto colorIconPath = QStringLiteral("image://svgimage-custom-color/");//role == DarkIconRole ? QStringLiteral("qrc:///client/theme/white/") : QStringLiteral("qrc:///client/theme/black/");
+        auto colorIconPath = role == DarkIconRole ? QStringLiteral("image://svgimage-custom-color/white/") : QStringLiteral("image://svgimage-custom-color/black/");
         if (a._type == Activity::NotificationType && !a._talkNotificationData.userAvatar.isEmpty()) {
-            return QStringLiteral("image://svgimage-custom-color/talk-app.svg");
+            return QStringLiteral("image://svgimage-custom-color/talk-bordered.svg");
         } else if (a._type == Activity::SyncResultType) {
             colorIconPath.append("state-error.svg");
             return colorIconPath;