[vte] app: Fix context menu styling



commit 730cca20d69cdd7fc8a67b6f578293b07373cf97
Author: Christian Persch <chpe src gnome org>
Date:   Wed Dec 22 21:22:35 2021 +0100

    app: Fix context menu styling
    
    Somehow with a recent gtk3 version, the context menu inherits the monospace
    style of the VteTerminal.

 src/app/app.cc | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/app/app.cc b/src/app/app.cc
index 5b0183e1..8b1d47ea 100644
--- a/src/app/app.cc
+++ b/src/app/app.cc
@@ -2075,6 +2075,9 @@ vteapp_window_show_context_menu(VteappWindow* window,
                 g_menu_append(menu, "_Fullscreen", "win.fullscreen");
 
         auto popup = gtk_menu_new_from_model(G_MENU_MODEL(menu));
+        gtk_style_context_add_class(gtk_widget_get_style_context (popup),
+                                    GTK_STYLE_CLASS_CONTEXT_MENU);
+
         gtk_menu_attach_to_widget(GTK_MENU(popup), GTK_WIDGET(window->terminal), nullptr);
         gtk_menu_popup(GTK_MENU(popup), nullptr, nullptr, nullptr, nullptr, button, timestamp);
         if (button == 0)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]