mirror of
https://github.com/uowuo/abaddon.git
synced 2024-09-20 15:01:51 +00:00
get link color from theme
This commit is contained in:
parent
2625f6e420
commit
e21b678220
|
@ -361,7 +361,7 @@ Gtk::Widget *ChatMessageItemContainer::CreateEmbedComponent(const EmbedData &emb
|
|||
}
|
||||
return false;
|
||||
});
|
||||
static auto color = Abaddon::Get().GetSettings().LinkColor;
|
||||
const auto color = title_label->get_style_context()->get_color(Gtk::STATE_FLAG_LINK);
|
||||
title_label->override_color(Gdk::RGBA(color));
|
||||
title_label->set_markup("<b>" + Glib::Markup::escape_text(*embed.Title) + "</b>");
|
||||
}
|
||||
|
@ -852,7 +852,8 @@ void ChatMessageItemContainer::HandleLinks(Gtk::TextView &tv) {
|
|||
std::string link = match.fetch(0);
|
||||
auto tag = buf->create_tag();
|
||||
m_link_tagmap[tag] = link;
|
||||
tag->property_foreground_rgba() = Gdk::RGBA(Abaddon::Get().GetSettings().LinkColor);
|
||||
const auto color = tv.get_style_context()->get_color(Gtk::STATE_FLAG_LINK);
|
||||
tag->property_foreground_rgba() = color;
|
||||
tag->set_property("underline", 1); // stupid workaround for vcpkg bug (i think)
|
||||
|
||||
const auto chars_start = g_utf8_pointer_to_offset(text.c_str(), text.c_str() + mstart);
|
||||
|
|
|
@ -68,7 +68,6 @@ void SettingsManager::ReadSettings() {
|
|||
SMINT("http", "concurrent", CacheHTTPConcurrency);
|
||||
SMSTR("http", "user_agent", UserAgent);
|
||||
SMSTR("style", "expandercolor", ChannelsExpanderColor);
|
||||
SMSTR("style", "linkcolor", LinkColor);
|
||||
SMSTR("style", "nsfwchannelcolor", NSFWChannelColor);
|
||||
SMSTR("style", "channelcolor", ChannelColor);
|
||||
SMSTR("style", "mentionbadgecolor", MentionBadgeColor);
|
||||
|
@ -159,7 +158,6 @@ void SettingsManager::Close() {
|
|||
SMINT("http", "concurrent", CacheHTTPConcurrency);
|
||||
SMSTR("http", "user_agent", UserAgent);
|
||||
SMSTR("style", "expandercolor", ChannelsExpanderColor);
|
||||
SMSTR("style", "linkcolor", LinkColor);
|
||||
SMSTR("style", "nsfwchannelcolor", NSFWChannelColor);
|
||||
SMSTR("style", "channelcolor", ChannelColor);
|
||||
SMSTR("style", "mentionbadgecolor", MentionBadgeColor);
|
||||
|
|
|
@ -39,7 +39,6 @@ public:
|
|||
|
||||
// [style]
|
||||
// TODO: convert to StyleProperty... or maybe not? i still cant figure out what the "correct" method is for this
|
||||
std::string LinkColor { "rgba(40, 200, 180, 255)" };
|
||||
std::string ChannelsExpanderColor { "rgba(255, 83, 112, 255)" };
|
||||
std::string NSFWChannelColor { "#ed6666" };
|
||||
std::string ChannelColor { "#fbfbfb" };
|
||||
|
|
Loading…
Reference in New Issue
Block a user