summaryrefslogtreecommitdiff
path: root/src/components/channellist/classic/guildlist.cpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2024-05-25 00:09:08 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2024-05-25 00:09:08 -0400
commit96687f019e415d830a7ebf57fe7c1372f76ba115 (patch)
tree37ecb99c052188b50a381a40d167ddab5f4b14ad /src/components/channellist/classic/guildlist.cpp
parentbf29c44d9fa7bbc11fd68824c2468d4946ea29a6 (diff)
downloadabaddon-portaudio-96687f019e415d830a7ebf57fe7c1372f76ba115.tar.gz
abaddon-portaudio-96687f019e415d830a7ebf57fe7c1372f76ba115.zip
add mention overlay to folders in classic
Diffstat (limited to 'src/components/channellist/classic/guildlist.cpp')
-rw-r--r--src/components/channellist/classic/guildlist.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/components/channellist/classic/guildlist.cpp b/src/components/channellist/classic/guildlist.cpp
index 6bee484..fdc15f9 100644
--- a/src/components/channellist/classic/guildlist.cpp
+++ b/src/components/channellist/classic/guildlist.cpp
@@ -103,7 +103,22 @@ static Gtk::Widget *AddMentionOverlay(Gtk::Widget *widget, Snowflake guild_id) {
mention_overlay->signal_realize().connect([mention_overlay]() {
mention_overlay->get_window()->set_pass_through(true);
});
- overlay->show_all();
+ mention_overlay->show();
+ overlay->show();
+ return overlay;
+}
+
+static Gtk::Widget *AddMentionOverlay(Gtk::Widget *widget, const UserSettingsGuildFoldersEntry &folder) {
+ auto *overlay = Gtk::make_managed<Gtk::Overlay>();
+ overlay->add(*widget);
+ auto *mention_overlay = Gtk::make_managed<MentionOverlay>(folder);
+ overlay->add_overlay(*mention_overlay);
+ overlay->set_overlay_pass_through(*mention_overlay, true);
+ mention_overlay->signal_realize().connect([mention_overlay]() {
+ mention_overlay->get_window()->set_pass_through(true);
+ });
+ mention_overlay->show();
+ overlay->show();
return overlay;
}
@@ -151,7 +166,7 @@ void GuildList::AddFolder(const UserSettingsGuildFoldersEntry &folder) {
}
folder_widget->show();
- add(*folder_widget);
+ add(*AddMentionOverlay(folder_widget, folder));
}
void GuildList::Clear() {