From 96687f019e415d830a7ebf57fe7c1372f76ba115 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Sat, 25 May 2024 00:09:08 -0400 Subject: add mention overlay to folders in classic --- src/components/channellist/classic/guildlist.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src/components/channellist/classic/guildlist.cpp') 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(); + overlay->add(*widget); + auto *mention_overlay = Gtk::make_managed(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() { -- cgit v1.2.3