summaryrefslogtreecommitdiff
path: root/src/components/channellist/classic/guildlistfolderitem.cpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2023-10-16 21:31:28 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2023-10-16 21:31:28 -0400
commit3e0cd83dd6026dc701c548dc40b41f5accbc29db (patch)
tree6a51464a60c7fe5947924f486d256f99475228fe /src/components/channellist/classic/guildlistfolderitem.cpp
parent1895a8f133e070f63680eacbaffaecf192bd608b (diff)
downloadabaddon-portaudio-3e0cd83dd6026dc701c548dc40b41f5accbc29db.tar.gz
abaddon-portaudio-3e0cd83dd6026dc701c548dc40b41f5accbc29db.zip
start channel list refactor for server list
Diffstat (limited to 'src/components/channellist/classic/guildlistfolderitem.cpp')
-rw-r--r--src/components/channellist/classic/guildlistfolderitem.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/components/channellist/classic/guildlistfolderitem.cpp b/src/components/channellist/classic/guildlistfolderitem.cpp
new file mode 100644
index 0000000..36d5a5a
--- /dev/null
+++ b/src/components/channellist/classic/guildlistfolderitem.cpp
@@ -0,0 +1,18 @@
+#include "guildlistfolderitem.hpp"
+
+GuildListFolderItem::GuildListFolderItem() {
+ m_revealer.add(m_box);
+ m_revealer.set_reveal_child(true);
+
+ m_ev.signal_button_press_event().connect([this](GdkEventButton *event) -> bool {
+ if (event->type == GDK_BUTTON_PRESS && event->button == GDK_BUTTON_PRIMARY) {
+ m_revealer.set_reveal_child(!m_revealer.get_reveal_child());
+ }
+ return false;
+ });
+
+ m_ev.add(m_image);
+ add(m_ev);
+ add(m_revealer);
+ show_all_children();
+}