From ca0340dd81f1a2bf11af5af626dc6d001abda827 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Thu, 8 Jun 2023 02:08:40 +0200 Subject: [PATCH] Fix communites sidebar color --- resources/qml/CommunitiesList.qml | 8 +++++--- resources/qml/emoji/StickerPicker.qml | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/resources/qml/CommunitiesList.qml b/resources/qml/CommunitiesList.qml index d93f5900..24444ae6 100644 --- a/resources/qml/CommunitiesList.qml +++ b/resources/qml/CommunitiesList.qml @@ -143,12 +143,14 @@ Page { enabled: false height: avatarSize roomid: model.id + textColor: model.avatarUrl.startsWith(":/") ? communityItem.unimportantText : communityItem.importantText url: { if (model.avatarUrl.startsWith("mxc://")) return model.avatarUrl.replace("mxc://", "image://MxcImage/"); - else if (model.avatarUrl.length > 0) - return "image://colorimage/" + model.avatarUrl + "?" + communityItem.unimportantText; - else + else if (model.avatarUrl.length > 0) { + console.log("image://colorimage/" + model.avatarUrl + "?" + communityItem.unimportantText); + return model.avatarUrl; + } else return ""; } width: avatarSize diff --git a/resources/qml/emoji/StickerPicker.qml b/resources/qml/emoji/StickerPicker.qml index 62d56a18..c10e57e7 100644 --- a/resources/qml/emoji/StickerPicker.qml +++ b/resources/qml/emoji/StickerPicker.qml @@ -231,6 +231,7 @@ Menu { height: sidebarAvatarSize width: sidebarAvatarSize url: modelData.url.replace("mxc://", "image://MxcImage/") + textColor: modelData.url.startsWith("mxc://") ? palette.text : palette.buttonText displayName: modelData.name roomid: modelData.name