allow override expander color

This commit is contained in:
ouwou 2023-12-15 21:44:58 -05:00
parent 5ea80d1a14
commit 19282c8642
2 changed files with 5 additions and 3 deletions

View File

@ -39,7 +39,10 @@ void RenderExpander(int x_offset, const Cairo::RefPtr<Cairo::Context> &cr, Gtk::
cr->move_to(x1, y1);
cr->line_to(x2, y2);
cr->line_to(x3, y3);
const auto expander_color = widget.get_style_context()->get_background_color(Gtk::STATE_FLAG_SELECTED);
auto expander_color = Gdk::RGBA(Abaddon::Get().GetSettings().ChannelsExpanderColor);
if (expander_color.get_alpha_u() == 0) {
expander_color = widget.get_style_context()->get_background_color(Gtk::STATE_FLAG_SELECTED);
}
cr->set_source_rgb(expander_color.get_red(), expander_color.get_green(), expander_color.get_blue());
cr->stroke();
}

View File

@ -38,8 +38,7 @@ public:
std::string UserAgent { "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36" };
// [style]
// TODO: convert to StyleProperty... or maybe not? i still cant figure out what the "correct" method is for this
std::string ChannelsExpanderColor { "rgba(255, 83, 112, 255)" };
std::string ChannelsExpanderColor { "rgba(255, 83, 112, 0)" };
std::string NSFWChannelColor { "#ed6666" };
std::string ChannelColor { "#fbfbfb" };
std::string MentionBadgeColor { "#b82525" };