[gnome-panel/gtk3] Remove border of panel menu bar
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/gtk3] Remove border of panel menu bar
- Date: Tue, 18 Jan 2011 19:22:10 +0000 (UTC)
commit d47c8957a1b7079891dee37b361694fce17b6b53
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Tue Jan 18 20:12:32 2011 +0100
Remove border of panel menu bar
gnome-panel/panel-menu-bar.c | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
---
diff --git a/gnome-panel/panel-menu-bar.c b/gnome-panel/panel-menu-bar.c
index ed7e87b..a60ef7c 100644
--- a/gnome-panel/panel-menu-bar.c
+++ b/gnome-panel/panel-menu-bar.c
@@ -276,6 +276,7 @@ panel_menu_bar_class_init (PanelMenuBarClass *klass)
{
GObjectClass *gobject_class = (GObjectClass *) klass;
GtkWidgetClass *widget_class = (GtkWidgetClass *) klass;
+ GtkCssProvider *provider;
gobject_class->get_property = panel_menu_bar_get_property;
gobject_class->set_property = panel_menu_bar_set_property;
@@ -295,13 +296,16 @@ panel_menu_bar_class_init (PanelMenuBarClass *klass)
PANEL_ORIENTATION_TOP,
G_PARAM_READWRITE));
- gtk_rc_parse_string (
- "style \"panel-menubar-style\"\n"
- "{\n"
- " GtkMenuBar::shadow-type = none\n"
- " GtkMenuBar::internal-padding = 0\n"
- "}\n"
- "class \"PanelMenuBar\" style \"panel-menubar-style\"");
+ 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);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]