summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-11-22 15:47:35 +0100
committerinfirit <[email protected]>2014-11-22 15:47:35 +0100
commit889ea7430ea3f5361832fd5ac816b0142921e519 (patch)
treeea3d3937b088fde34fda58a41af0f407d77aacf2
parentea49a097760f4757c0fafa460724f4b642d649c0 (diff)
downloadmate-panel-889ea7430ea3f5361832fd5ac816b0142921e519.tar.bz2
mate-panel-889ea7430ea3f5361832fd5ac816b0142921e519.tar.xz
Gtk3: Remove border of panel menu bar
Taken from gnome-panel commit: d47c8957a1b7079891dee37b361694fce17b6b53 From: Carlos Garcia Campos <[email protected]>
-rw-r--r--mate-panel/panel-menu-bar.c17
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"