summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2021-07-19 01:42:55 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2021-07-19 01:42:55 -0400
commit0250229e8184ea18b8799feb1cc3622d847adec3 (patch)
tree79a361cf535f24c83a1e76ad0f8bfc0384f2f568
parent8a4283edd126366472af588ebf89580eca9c95c6 (diff)
downloadabaddon-portaudio-0250229e8184ea18b8799feb1cc3622d847adec3.tar.gz
abaddon-portaudio-0250229e8184ea18b8799feb1cc3622d847adec3.zip
less than ideal solution for category expander color
-rw-r--r--components/channels.cpp3
-rw-r--r--settings.cpp4
-rw-r--r--settings.hpp11
3 files changed, 16 insertions, 2 deletions
diff --git a/components/channels.cpp b/components/channels.cpp
index e67d014..0208975 100644
--- a/components/channels.cpp
+++ b/components/channels.cpp
@@ -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;
diff --git a/settings.cpp b/settings.cpp
index 6083d96..2974dca 100644
--- a/settings.cpp
+++ b/settings.cpp
@@ -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);
}
diff --git a/settings.hpp b/settings.hpp
index d77b418..7559dc0 100644
--- a/settings.hpp
+++ b/settings.hpp
@@ -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>