diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-01-13 23:16:02 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-01-13 23:16:02 -0500 |
commit | f51ab48009e7fcfafee1d09800764fcbd5d36bf5 (patch) | |
tree | d2156ddbe2367a096c58682704cdcb369eb694a5 /components | |
parent | 6c4bdb51a3d35542efe377bafb817f9231822d97 (diff) | |
download | abaddon-portaudio-f51ab48009e7fcfafee1d09800764fcbd5d36bf5.tar.gz abaddon-portaudio-f51ab48009e7fcfafee1d09800764fcbd5d36bf5.zip |
add css selectors to nsfw channels and add color style
Diffstat (limited to 'components')
-rw-r--r-- | components/channels.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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); |