add css selectors to nsfw channels and add color style

This commit is contained in:
ouwou
2021-01-13 23:16:02 -05:00
parent 6c4bdb51a3
commit f51ab48009
3 changed files with 9 additions and 0 deletions

View File

@@ -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);