diff --git a/README.md b/README.md index e340093..b7b6add 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ Make sure you start from the directory where `css` and `res` are .channel-row-category - Only rows containing a category .channel-row-guild - Only rows containing a guild .channel-row-label - All labels within the channel container +.nsfw - Applied to channel row label's and their container for NSFW channels .messages - Container of user messages .message-container - The container which holds a user's messages diff --git a/components/channels.cpp b/components/channels.cpp index 667e138..64613a4 100644 --- a/components/channels.cpp +++ b/components/channels.cpp @@ -245,6 +245,10 @@ ChannelListRowChannel::ChannelListRowChannel(const ChannelData *data) { m_lbl->get_style_context()->add_class("channel-row-label"); auto buf = m_lbl->get_buffer(); + if (data->IsNSFW.has_value() && *data->IsNSFW) { + get_style_context()->add_class("nsfw"); + m_lbl->get_style_context()->add_class("nsfw"); + } buf->set_text("#" + *data->Name); Abaddon::Get().GetEmojis().ReplaceEmojis(buf, ChannelEmojiSize); m_box->set_halign(Gtk::ALIGN_START); diff --git a/css/main.css b/css/main.css index f4bfec2..d7d4108 100644 --- a/css/main.css +++ b/css/main.css @@ -32,6 +32,10 @@ background: rgba(0, 0, 0, 0); } +.channel-row-label.nsfw text { + color: #ed6666; +} + .channel-row:focus { background-color: #34495e; }