diff options
author | lukefromdc <[email protected]> | 2015-08-30 00:49:48 -0400 |
---|---|---|
committer | raveit65 <[email protected]> | 2015-10-10 01:34:34 +0200 |
commit | e30ac32ad31ab1e6415356f31a38c329a2a17918 (patch) | |
tree | fc5e74f1311ceacc3168f5b90113ef39548226e6 | |
parent | c71b55007d73485bfc3fc1d30c42cb329bc30125 (diff) | |
download | mate-panel-e30ac32ad31ab1e6415356f31a38c329a2a17918.tar.bz2 mate-panel-e30ac32ad31ab1e6415356f31a38c329a2a17918.tar.xz |
Add custom menu theming support to applet.c
Make applet menus follow the .mate-panel-menu-bar .menu selector in the gtk theme, and the menu window follow the .mate-panel-menu-bar selector. Use the former to set a custom menu theme, the latter to alter or remove shadows from applet menus
-rw-r--r-- | mate-panel/applet.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/mate-panel/applet.c b/mate-panel/applet.c index 516d9ab4..df58e389 100644 --- a/mate-panel/applet.c +++ b/mate-panel/applet.c @@ -564,6 +564,19 @@ mate_panel_applet_create_menu (AppletInfo *info) return NULL; } +/* Set up theme and transparency support */ +#if GTK_CHECK_VERSION (3, 0, 0) + GtkWidget *toplevel = gtk_widget_get_toplevel (menu); +/* Fix any failures of compiz/other wm's to communicate with gtk for transparency */ + GdkScreen *screen = gtk_widget_get_screen(GTK_WIDGET(toplevel)); + GdkVisual *visual = gdk_screen_get_rgba_visual(screen); + gtk_widget_set_visual(GTK_WIDGET(toplevel), visual); +/* Set menu and it's toplevel window to follow panel theme */ + GtkStyleContext *context; + context = gtk_widget_get_style_context (GTK_WIDGET(toplevel)); + gtk_style_context_add_class(context,"gnome-panel-menu-bar"); + gtk_style_context_add_class(context,"mate-panel-menu-bar"); +#endif return menu; } |