forked from OpenGamers/abaddon
add css selectors to nsfw channels and add color style
This commit is contained in:
parent
6c4bdb51a3
commit
f51ab48009
@ -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
|
||||
|
@ -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);
|
||||
|
@ -32,6 +32,10 @@
|
||||
background: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.channel-row-label.nsfw text {
|
||||
color: #ed6666;
|
||||
}
|
||||
|
||||
.channel-row:focus {
|
||||
background-color: #34495e;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user