less than ideal solution for category expander color

This commit is contained in:
ouwou
2021-07-19 01:42:55 -04:00
parent 8a4283edd1
commit 0250229e81
3 changed files with 16 additions and 2 deletions

View File

@@ -748,7 +748,8 @@ void CellRendererChannels::render_vfunc_category(const Cairo::RefPtr<Cairo::Cont
cr->move_to(x1, y1);
cr->line_to(x2, y2);
cr->line_to(x3, y3);
cr->set_source_rgb(1.0, 0.3255, 0.4392);
static const auto expander_color = Gdk::RGBA(Abaddon::Get().GetSettings().GetChannelsExpanderColor());
cr->set_source_rgb(expander_color.get_red(), expander_color.get_green(), expander_color.get_blue());
cr->stroke();
Gtk::Requisition text_minimum, text_natural;

View File

@@ -66,6 +66,10 @@ std::string SettingsManager::GetLinkColor() const {
return GetSettingString("misc", "linkcolor", "rgba(40, 200, 180, 255)");
}
std::string SettingsManager::GetChannelsExpanderColor() const {
return GetSettingString("misc", "expandercolor", "rgba(255, 83, 112, 255)");
}
int SettingsManager::GetCacheHTTPConcurrency() const {
return GetSettingInt("http", "concurrent", 20);
}

View File

@@ -15,7 +15,6 @@ public:
bool GetShowMemberListDiscriminators() const;
bool GetShowStockEmojis() const;
bool GetShowCustomEmojis() const;
std::string GetLinkColor() const;
int GetCacheHTTPConcurrency() const;
bool GetPrefetch() const;
std::string GetMainCSS() const;
@@ -24,6 +23,16 @@ public:
std::string GetGatewayURL() const;
std::string GetAPIBaseURL() const;
// i would like to use Gtk::StyleProperty for this, but it will not work on windows
// #1 it's missing from the project files for the version used by vcpkg
// #2 it's still broken and doesn't function even when added to the solution
// #3 it's a massive pain in the ass to try and bump the version to a functioning version
// because they switch build systems to nmake/meson (took months to get merged in vcpkg)
// #4 c++ build systems sucks
// perhaps i'll bump to gtk4 when it's more stable
std::string GetLinkColor() const;
std::string GetChannelsExpanderColor() const;
bool IsValid() const;
template<typename T>