Skip to content

Commit

Permalink
qrc:/// => image://
Browse files Browse the repository at this point in the history
Signed-off-by: Camila Ayres <[email protected]>
  • Loading branch information
camilasan authored and mgallien committed Sep 6, 2024
1 parent d05ebc3 commit 6f13fa6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/gui/ErrorBox.qml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ Item {

background: null
icon.color: palette.buttonText
icon.source: "qrc:///client/theme/close.svg"
icon.source: "image://svgimage-custom-color/close.svg"

visible: errorBox.showCloseButton
enabled: visible
Expand Down
2 changes: 1 addition & 1 deletion src/gui/tray/UnifiedSearchResultNothingFound.qml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ ColumnLayout {

Image {
id: unifiedSearchResultsNoResultsLabelIcon
source: "qrc:///client/theme/magnifying-glass.svg"
source: "image://svgimage-custom-color/magnifying-glass.svg"
sourceSize.width: Style.trayWindowHeaderHeight / 2
sourceSize.height: Style.trayWindowHeaderHeight / 2
Layout.alignment: Qt.AlignHCenter
Expand Down
4 changes: 2 additions & 2 deletions src/gui/tray/Window.qml
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ ApplicationWindow {
Image {
Layout.leftMargin: 12
verticalAlignment: Qt.AlignCenter
source: Theme.darkMode ? "qrc:///client/theme/white/add.svg" : "qrc:///client/theme/black/add.svg"
source: "image://svgimage-custom-color/add.svg"
sourceSize.width: Style.headerButtonIconSize
sourceSize.height: Style.headerButtonIconSize
}
Expand Down Expand Up @@ -513,7 +513,7 @@ ApplicationWindow {
Layout.alignment: Qt.AlignRight
verticalAlignment: Qt.AlignCenter
Layout.margins: Style.accountDropDownCaretMargin
source: "qrc:///client/theme/white/caret-down.svg"
source: "image://svgimage-custom-color/caret-down.svg/"
sourceSize.width: Style.accountDropDownCaretSize
sourceSize.height: Style.accountDropDownCaretSize
Accessible.role: Accessible.PopupMenu
Expand Down
8 changes: 4 additions & 4 deletions src/gui/tray/activitydata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ OCC::Activity Activity::fromActivityJson(const QJsonObject &json, const AccountP

if(!previewsData.isEmpty()) {
if(activity._icon.contains(QStringLiteral("add-color.svg"))) {
activity._icon = "qrc:///client/theme/colored/add-bordered.svg";
} else if(activity._icon.contains(QStringLiteral("delete-color.svg"))) {
activity._icon = "qrc:///client/theme/colored/delete-bordered.svg";
activity._icon = "image://svgimage-custom-color/add.svg";
} else if(activity._icon.contains(QStringLiteral("delete.svg"))) {
activity._icon = "image://svgimage-custom-color/delete.svg";
} else if(activity._icon.contains(QStringLiteral("change.svg"))) {
activity._icon = "qrc:///client/theme/colored/change-bordered.svg";
activity._icon = "image://svgimage-custom-color/change.svg";
}
}

Expand Down
16 changes: 8 additions & 8 deletions src/gui/tray/activitylistmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,9 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const
};

const auto generateIconPath = [&]() {
auto colorIconPath = role == DarkIconRole ? QStringLiteral("qrc:///client/theme/white/") : QStringLiteral("qrc:///client/theme/black/");
auto colorIconPath = QStringLiteral("image://svgimage-custom-color/");//role == DarkIconRole ? QStringLiteral("qrc:///client/theme/white/") : QStringLiteral("qrc:///client/theme/black/");
if (a._type == Activity::NotificationType && !a._talkNotificationData.userAvatar.isEmpty()) {
return QStringLiteral("qrc:///client/theme/colored/talk-bordered.svg");
return QStringLiteral("image://svgimage-custom-color/talk-bordered.svg");
} else if (a._type == Activity::SyncResultType) {
colorIconPath.append("state-error.svg");
return colorIconPath;
Expand All @@ -254,14 +254,14 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const
} else {
// File sync successful
if (a._fileAction == "file_created") {
return a._previews.empty() ? QStringLiteral("qrc:///client/theme/colored/add.svg")
: QStringLiteral("qrc:///client/theme/colored/add-bordered.svg");
return a._previews.empty() ? QStringLiteral("image://svgimage-custom-color/add.svg")
: QStringLiteral("image://svgimage-custom-color/add-bordered.svg");
} else if (a._fileAction == "file_deleted") {
return a._previews.empty() ? QStringLiteral("qrc:///client/theme/colored/delete.svg")
: QStringLiteral("qrc:///client/theme/colored/delete-bordered.svg");
return a._previews.empty() ? QStringLiteral("image://svgimage-custom-color/delete.svg")
: QStringLiteral("image://svgimage-custom-color/delete-bordered.svg");
} else {
return a._previews.empty() ? colorIconPath % QStringLiteral("change.svg")
: QStringLiteral("qrc:///client/theme/colored/change-bordered.svg");
: QStringLiteral("image://svgimage-custom-color/change-bordered.svg");
}
}
} else {
Expand Down Expand Up @@ -511,7 +511,7 @@ void ActivityListModel::insertOrRemoveDummyFetchingActivity()
_dummyFetchingActivities._objectType = dummyFetchingActivityObjectType;
_dummyFetchingActivities._subject = tr("Fetching activities …");
_dummyFetchingActivities._dateTime = QDateTime::currentDateTime();
_dummyFetchingActivities._icon = QLatin1String("qrc:///client/theme/colored/change-bordered.svg");
_dummyFetchingActivities._icon = QLatin1String("image://svgimage-custom-color/change-bordered.svg");

addEntriesToActivityList({_dummyFetchingActivities});
} else if (!_finalList.isEmpty() && _finalList.first()._objectType == dummyFetchingActivityObjectType) {
Expand Down

0 comments on commit 6f13fa6

Please sign in to comment.