summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2023-12-15 22:06:16 -0500
committerouwou <26526779+ouwou@users.noreply.github.com>2023-12-15 22:06:16 -0500
commit0187e6958464f9a9d5c8bc1143d6dfac60e862b1 (patch)
tree4e9dd724966203dd1c8b463543c103a2404aacb7 /src
parent19282c8642f5bc1c064a8f8645b2d5380d2014b4 (diff)
downloadabaddon-portaudio-0187e6958464f9a9d5c8bc1143d6dfac60e862b1.tar.gz
abaddon-portaudio-0187e6958464f9a9d5c8bc1143d6dfac60e862b1.zip
remove channel color style setting
Diffstat (limited to 'src')
-rw-r--r--src/components/channelscellrenderer.cpp57
-rw-r--r--src/settings.cpp2
-rw-r--r--src/settings.hpp1
3 files changed, 3 insertions, 57 deletions
diff --git a/src/components/channelscellrenderer.cpp b/src/components/channelscellrenderer.cpp
index 3f10330..7fd97da 100644
--- a/src/components/channelscellrenderer.cpp
+++ b/src/components/channelscellrenderer.cpp
@@ -258,14 +258,11 @@ void CellRendererChannels::render_vfunc_folder(const Cairo::RefPtr<Cairo::Contex
Gdk::Rectangle text_cell_area(text_x, text_y, text_w, text_h);
- static const auto color = Gdk::RGBA(Abaddon::Get().GetSettings().ChannelColor);
if (m_property_color.get_value().has_value()) {
- // m_renderer_text.property_foreground_rgba() = *m_property_color.get_value();
- } else {
- // m_renderer_text.property_foreground_rgba() = color;
+ m_renderer_text.property_foreground_rgba() = *m_property_color.get_value();
}
m_renderer_text.render(cr, widget, background_area, text_cell_area, flags);
- // m_renderer_text.property_foreground_set() = false;
+ m_renderer_text.property_foreground_set() = false;
}
// guild functions
@@ -342,8 +339,6 @@ void CellRendererChannels::render_vfunc_guild(const Cairo::RefPtr<Cairo::Context
static_cast<int>(text_w),
static_cast<int>(text_h));
- static const auto color = Gdk::RGBA(Abaddon::Get().GetSettings().ChannelColor);
- // m_renderer_text.property_foreground_rgba() = color;
m_renderer_text.render(cr, widget, background_area, text_cell_area, flags);
const bool hover_only = Abaddon::Get().GetSettings().AnimatedGuildHoverOnly;
@@ -435,23 +430,14 @@ void CellRendererChannels::render_vfunc_category(const Cairo::RefPtr<Cairo::Cont
Gdk::Rectangle text_cell_area(text_x, text_y, text_w, text_h);
- static const auto color = Gdk::RGBA(Abaddon::Get().GetSettings().ChannelColor);
auto &discord = Abaddon::Get().GetDiscordClient();
const auto id = m_property_id.get_value();
- if (discord.IsChannelMuted(m_property_id.get_value())) {
- auto muted = color;
- muted.set_red(muted.get_red() * 0.5);
- muted.set_green(muted.get_green() * 0.5);
- muted.set_blue(muted.get_blue() * 0.5);
- // m_renderer_text.property_foreground_rgba() = muted;
- } else {
+ if (!discord.IsChannelMuted(m_property_id.get_value())) {
if (discord.GetUnreadChannelsCountForCategory(id) > 0) {
AddUnreadIndicator(cr, background_area);
}
- // m_renderer_text.property_foreground_rgba() = color;
}
m_renderer_text.render(cr, widget, background_area, text_cell_area, flags);
- // m_renderer_text.property_foreground_set() = false;
}
// text channel
@@ -487,20 +473,7 @@ void CellRendererChannels::render_vfunc_channel(const Cairo::RefPtr<Cairo::Conte
const auto id = m_property_id.get_value();
const bool is_muted = discord.IsChannelMuted(id);
- static const auto sfw_unmuted = Gdk::RGBA(Abaddon::Get().GetSettings().ChannelColor);
-
static const auto nsfw_color = Gdk::RGBA(Abaddon::Get().GetSettings().NSFWChannelColor);
- /* if (m_property_nsfw.get_value())
- // m_renderer_text.property_foreground_rgba() = nsfw_color;
- else
- // m_renderer_text.property_foreground_rgba() = sfw_unmuted;
- if (is_muted) {
- auto col = // m_renderer_text.property_foreground_rgba().get_value();
- col.set_red(col.get_red() * 0.5);
- col.set_green(col.get_green() * 0.5);
- col.set_blue(col.get_blue() * 0.5);
- // m_renderer_text.property_foreground_rgba() = col;
- }*/
if (is_muted) {
auto color = widget.get_style_context()->get_color(Gtk::STATE_FLAG_NORMAL);
@@ -509,8 +482,6 @@ void CellRendererChannels::render_vfunc_channel(const Cairo::RefPtr<Cairo::Conte
}
m_renderer_text.render(cr, widget, background_area, text_cell_area, flags);
m_renderer_text.property_foreground_set() = false;
- // unset foreground to default so properties dont bleed
- // m_renderer_text.property_foreground_set() = false;
// unread
if (!Abaddon::Get().GetSettings().Unreads) return;
@@ -564,18 +535,7 @@ void CellRendererChannels::render_vfunc_thread(const Cairo::RefPtr<Cairo::Contex
const auto id = m_property_id.get_value();
const bool is_muted = discord.IsChannelMuted(id);
- static const auto color = Gdk::RGBA(Abaddon::Get().GetSettings().ChannelColor);
- if (Abaddon::Get().GetDiscordClient().IsChannelMuted(m_property_id.get_value())) {
- auto muted = color;
- muted.set_red(muted.get_red() * 0.5);
- muted.set_green(muted.get_green() * 0.5);
- muted.set_blue(muted.get_blue() * 0.5);
- // m_renderer_text.property_foreground_rgba() = muted;
- } else {
- // m_renderer_text.property_foreground_rgba() = color;
- }
m_renderer_text.render(cr, widget, background_area, text_cell_area, flags);
- // m_renderer_text.property_foreground_set() = false;
// unread
if (!Abaddon::Get().GetSettings().Unreads) return;
@@ -857,18 +817,7 @@ void CellRendererChannels::render_vfunc_dm(const Cairo::RefPtr<Cairo::Context> &
const auto id = m_property_id.get_value();
const bool is_muted = discord.IsChannelMuted(id);
- static const auto color = Gdk::RGBA(Abaddon::Get().GetSettings().ChannelColor);
- if (Abaddon::Get().GetDiscordClient().IsChannelMuted(m_property_id.get_value())) {
- auto muted = color;
- muted.set_red(muted.get_red() * 0.5);
- muted.set_green(muted.get_green() * 0.5);
- muted.set_blue(muted.get_blue() * 0.5);
- // m_renderer_text.property_foreground_rgba() = muted;
- } else {
- // m_renderer_text.property_foreground_rgba() = color;
- }
m_renderer_text.render(cr, widget, background_area, text_cell_area, flags);
- // m_renderer_text.property_foreground_set() = false;
Gdk::Cairo::set_source_pixbuf(cr, m_property_pixbuf.get_value(), icon_x, icon_y);
cr->rectangle(icon_x, icon_y, icon_w, icon_h);
diff --git a/src/settings.cpp b/src/settings.cpp
index 368d5bb..d1dff3f 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -69,7 +69,6 @@ void SettingsManager::ReadSettings() {
SMSTR("http", "user_agent", UserAgent);
SMSTR("style", "expandercolor", ChannelsExpanderColor);
SMSTR("style", "nsfwchannelcolor", NSFWChannelColor);
- SMSTR("style", "channelcolor", ChannelColor);
SMSTR("style", "mentionbadgecolor", MentionBadgeColor);
SMSTR("style", "mentionbadgetextcolor", MentionBadgeTextColor);
SMSTR("style", "unreadcolor", UnreadIndicatorColor);
@@ -159,7 +158,6 @@ void SettingsManager::Close() {
SMSTR("http", "user_agent", UserAgent);
SMSTR("style", "expandercolor", ChannelsExpanderColor);
SMSTR("style", "nsfwchannelcolor", NSFWChannelColor);
- SMSTR("style", "channelcolor", ChannelColor);
SMSTR("style", "mentionbadgecolor", MentionBadgeColor);
SMSTR("style", "mentionbadgetextcolor", MentionBadgeTextColor);
SMSTR("style", "unreadcolor", UnreadIndicatorColor);
diff --git a/src/settings.hpp b/src/settings.hpp
index a51d93b..99e1adc 100644
--- a/src/settings.hpp
+++ b/src/settings.hpp
@@ -40,7 +40,6 @@ public:
// [style]
std::string ChannelsExpanderColor { "rgba(255, 83, 112, 0)" };
std::string NSFWChannelColor { "#ed6666" };
- std::string ChannelColor { "#fbfbfb" };
std::string MentionBadgeColor { "#b82525" };
std::string MentionBadgeTextColor { "#fbfbfb" };
std::string UnreadIndicatorColor { "#ffffff" };