From f8a0551dbaa79af40ff5287ff0850984cf3b4bec Mon Sep 17 00:00:00 2001 From: Camila Ayres Date: Wed, 11 Sep 2024 14:30:15 +0200 Subject: [PATCH] Fix tray header light/dark theme. Signed-off-by: Camila Ayres --- src/gui/tray/TrayFoldersMenuButton.qml | 8 ++++---- src/gui/tray/Window.qml | 26 +++++++++++--------------- src/gui/tray/activitylistmodel.cpp | 4 ++-- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/gui/tray/TrayFoldersMenuButton.qml b/src/gui/tray/TrayFoldersMenuButton.qml index 85a930f34..a2197c7c8 100644 --- a/src/gui/tray/TrayFoldersMenuButton.qml +++ b/src/gui/tray/TrayFoldersMenuButton.qml @@ -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: { diff --git a/src/gui/tray/Window.qml b/src/gui/tray/Window.qml index ccb192781..f1ac084f0 100644 --- a/src/gui/tray/Window.qml +++ b/src/gui/tray/Window.qml @@ -505,20 +505,15 @@ ApplicationWindow { } } - ColorOverlay { - cached: true - width: source.width - height: source.height - source: Image { - Layout.alignment: Qt.AlignRight - verticalAlignment: Qt.AlignCenter - Layout.margins: Style.accountDropDownCaretMargin - source: "image://svgimage-custom-color/caret-down.svg/" - sourceSize.width: Style.accountDropDownCaretSize - sourceSize.height: Style.accountDropDownCaretSize - Accessible.role: Accessible.PopupMenu - Accessible.name: qsTr("Account switcher and settings menu") - } + Image { + Layout.alignment: Qt.AlignRight + verticalAlignment: Qt.AlignCenter + Layout.margins: Style.accountDropDownCaretMargin + source: "image://svgimage-custom-color/caret-down.svg/" + palette.windowText + sourceSize.width: Style.accountDropDownCaretSize + sourceSize.height: Style.accountDropDownCaretSize + Accessible.role: Accessible.PopupMenu + Accessible.name: qsTr("Account switcher and settings menu") } } } @@ -564,7 +559,7 @@ ApplicationWindow { HeaderButton { id: trayWindowAppsButton - icon.source: "image://svgimage-custom-color/more-apps.svg/" + icon.source: "image://svgimage-custom-color/more-apps.svg/" + palette.windowText onClicked: { if(appsMenuListView.count <= 0) { @@ -615,6 +610,7 @@ ApplicationWindow { text: model.appName font.pixelSize: Style.topLinePixelSize icon.source: model.appIconUrl + icon.color: palette.windowText onTriggered: UserAppsModel.openAppUrl(appUrl) hoverEnabled: true Accessible.role: Accessible.MenuItem diff --git a/src/gui/tray/activitylistmodel.cpp b/src/gui/tray/activitylistmodel.cpp index d200ecf7c..c35043807 100644 --- a/src/gui/tray/activitylistmodel.cpp +++ b/src/gui/tray/activitylistmodel.cpp @@ -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;