summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Persch <chpe@src.gnome.org>2021-12-22 21:22:35 +0100
committerChristian Persch <chpe@src.gnome.org>2021-12-22 21:22:35 +0100
commit730cca20d69cdd7fc8a67b6f578293b07373cf97 (patch)
tree63ccc9b2603cd1b6c423e06edbec96514e47f740
parent980b3f4f62051e8acf0a2a2973c861dbf8fff4db (diff)
downloadvte-730cca20d69cdd7fc8a67b6f578293b07373cf97.tar.gz
app: Fix context menu styling
Somehow with a recent gtk3 version, the context menu inherits the monospace style of the VteTerminal.
-rw-r--r--src/app/app.cc3
1 files changed, 3 insertions, 0 deletions
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)