X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fbufferviewfilter.cpp;h=5727d348fbee58ccebc63652a083c9ffe9dc0c6f;hp=58998530b0207a8db40f11e578444c2894f4fa1d;hb=da1ad61b4d3f7b21d34a3a22e8408eb593d2b0a8;hpb=332069a1830ed3a055ac6f2d7661bae1cc83e40c diff --git a/src/uisupport/bufferviewfilter.cpp b/src/uisupport/bufferviewfilter.cpp index 58998530..5727d348 100644 --- a/src/uisupport/bufferviewfilter.cpp +++ b/src/uisupport/bufferviewfilter.cpp @@ -216,7 +216,7 @@ bool BufferViewFilter::filterAcceptBuffer(const QModelIndex &source_bufferIndex) if(!(config()->allowedBufferTypes() & (BufferInfo::Type)source_bufferIndex.data(NetworkModel::BufferTypeRole).toInt())) return false; - if(config()->hideInactiveBuffers() && !source_bufferIndex.data(NetworkModel::ItemActiveRole).toBool()) + if(config()->hideInactiveBuffers() && !source_bufferIndex.data(NetworkModel::ItemActiveRole).toBool() && activityLevel <= BufferInfo::OtherActivity) return false; if(config()->minimumActivity() > activityLevel) { @@ -302,9 +302,6 @@ QVariant BufferViewFilter::data(const QModelIndex &index, int role) const { } QVariant BufferViewFilter::foreground(const QModelIndex &index) const { - if(!index.data(NetworkModel::ItemActiveRole).toBool()) - return _FgColorInactiveActivity; - BufferInfo::ActivityLevel activity = (BufferInfo::ActivityLevel)index.data(NetworkModel::BufferActivityRole).toInt(); if(activity & BufferInfo::Highlight) @@ -314,6 +311,9 @@ QVariant BufferViewFilter::foreground(const QModelIndex &index) const { if(activity & BufferInfo::OtherActivity) return _FgColorOtherActivity; + if(!index.data(NetworkModel::ItemActiveRole).toBool()) + return _FgColorInactiveActivity; + return _FgColorNoActivity; }