[vte/vte-0-66] app: Fix context menu styling



commit 95b57dd74209d22a6aae7d66d532c33e646e5be0
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.
    
    (cherry picked from commit 730cca20d69cdd7fc8a67b6f578293b07373cf97)

 src/app/app.cc | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/app/app.cc b/src/app/app.cc
index 3beff861..03335408 100644
--- a/src/app/app.cc
+++ b/src/app/app.cc
@@ -2034,6 +2034,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]