From ec92afa2fe9e6013d723ab42e3d99d6e9b5b418d Mon Sep 17 00:00:00 2001 From: defnax Date: Thu, 25 Jun 2020 16:36:16 +0200 Subject: [PATCH] Fixed to get work selection color on darkstylesheets * Fixed to get work selection color on dark stylesheets * Show group icon on the tabs --- .../gui/gxschannels/GxsChannelPostThumbnail.h | 2 ++ .../GxsChannelPostsWidgetWithModel.cpp | 16 ++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelPostThumbnail.h b/retroshare-gui/src/gui/gxschannels/GxsChannelPostThumbnail.h index fd5c82d6b..4a0ae5855 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelPostThumbnail.h +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelPostThumbnail.h @@ -36,6 +36,8 @@ class ChannelPostThumbnailView: public QWidget { + Q_OBJECT + public: // This variable determines the zoom factor on the text below thumbnails. 2.0 is mostly correct for all screen. static constexpr float THUMBNAIL_OVERSAMPLE_FACTOR = 2.0; diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp index 6db53d2b6..73508c1e8 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelPostsWidgetWithModel.cpp @@ -705,15 +705,15 @@ void GxsChannelPostsWidgetWithModel::groupNameChanged(const QString &name) QIcon GxsChannelPostsWidgetWithModel::groupIcon() { -// if (mStateHelper->isLoading(mTokenTypeGroupData) || mStateHelper->isLoading(mTokenTypeAllPosts)) { -// return QIcon(":/images/kalarm.png"); -// } + /* CHANNEL IMAGE */ + QPixmap chanImage; + if (mGroup.mImage.mData != NULL) { + GxsIdDetails::loadPixmapFromData(mGroup.mImage.mData, mGroup.mImage.mSize, chanImage,GxsIdDetails::ORIGINAL); + } else { + chanImage = FilesDefs::getPixmapFromQtResourcePath(ChannelPostThumbnailView::CHAN_DEFAULT_IMAGE); + } -// if (mNewCount) { -// return QIcon(":/images/message-state-new.png"); -// } - - return QIcon(); + return QIcon(chanImage); } /*************************************************************************************/