diff options
-rw-r--r-- | mate-panel/panel-menu-bar.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/mate-panel/panel-menu-bar.c b/mate-panel/panel-menu-bar.c index 172217aa..39fa70cc 100644 --- a/mate-panel/panel-menu-bar.c +++ b/mate-panel/panel-menu-bar.c @@ -296,6 +296,9 @@ static void panel_menu_bar_class_init(PanelMenuBarClass* klass) { GObjectClass* gobject_class = (GObjectClass*) klass; GtkWidgetClass* widget_class = (GtkWidgetClass*) klass; +#if GTK_CHECK_VERSION (3, 0, 0) + GtkCssProvider *provider; +#endif gobject_class->get_property = panel_menu_bar_get_property; gobject_class->set_property = panel_menu_bar_set_property; @@ -308,7 +311,19 @@ static void panel_menu_bar_class_init(PanelMenuBarClass* klass) g_object_class_install_property(gobject_class, PROP_ORIENTATION, g_param_spec_enum("orientation", "Orientation", "The PanelMenuBar orientation", PANEL_TYPE_ORIENTATION, PANEL_ORIENTATION_TOP, G_PARAM_READWRITE)); -#if !GTK_CHECK_VERSION (3, 0, 0) +#if GTK_CHECK_VERSION (3, 0, 0) + provider = gtk_css_provider_new (); + gtk_css_provider_load_from_data (provider, + "PanelMenuBar {\n" + " border-width: 0px;\n" + "}\n", + -1, NULL); + gtk_style_context_add_provider_for_screen (gdk_screen_get_default(), + GTK_STYLE_PROVIDER (provider), + GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); + + g_object_unref (provider); +#else gtk_rc_parse_string ( "style \"panel-menubar-style\"\n" "{\n" |