Make torrents context menu look more like one (GTK client) (#3957)

This commit is contained in:
Mike Gelfand 2022-10-13 09:18:33 -07:00 committed by GitHub
parent 4ea9c87fea
commit 60340387e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -125,8 +125,10 @@ void MainWindow::Impl::on_popup_menu([[maybe_unused]] double view_x, [[maybe_unu
auto const menu = gtr_action_get_object<Gio::Menu>("main-window-popup");
#if GTKMM_CHECK_VERSION(4, 0, 0)
popup_menu_ = Gtk::make_managed<Gtk::PopoverMenu>(menu);
popup_menu_ = Gtk::make_managed<Gtk::PopoverMenu>(menu, Gtk::PopoverMenu::Flags::NESTED);
popup_menu_->set_parent(window_);
popup_menu_->set_has_arrow(false);
popup_menu_->set_halign(window_.get_direction() == Gtk::TextDirection::RTL ? Gtk::Align::END : Gtk::Align::START);
#else
popup_menu_ = Gtk::make_managed<Gtk::Menu>(menu);
popup_menu_->attach_to_widget(window_);