[gedit] Set sidebar style for each item in the panel
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Set sidebar style for each item in the panel
- Date: Fri, 16 Dec 2011 15:00:05 +0000 (UTC)
commit b5b79b9827bacee3de35e2aba5d8573c3a1bb89b
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Fri Dec 16 10:39:17 2011 +0100
Set sidebar style for each item in the panel
gedit/gedit-panel.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-panel.c b/gedit/gedit-panel.c
index 21c800e..497405c 100644
--- a/gedit/gedit-panel.c
+++ b/gedit/gedit-panel.c
@@ -748,6 +748,7 @@ gedit_panel_add_item (GeditPanel *panel,
GeditPanelItem *data;
GtkWidget *tab_label;
GtkWidget *menu_label;
+ GtkStyleContext *context;
gint w, h;
g_return_val_if_fail (GEDIT_IS_PANEL (panel), FALSE);
@@ -790,7 +791,16 @@ gedit_panel_add_item (GeditPanel *panel,
gtk_widget_set_halign (menu_label, GTK_ALIGN_START);
if (!gtk_widget_get_visible (item))
+ {
gtk_widget_show (item);
+ }
+
+ /* Only apply the sidebar style to the side panel */
+ if (panel->priv->orientation == GTK_ORIENTATION_VERTICAL)
+ {
+ context = gtk_widget_get_style_context (item);
+ gtk_style_context_add_class (context, GTK_STYLE_CLASS_SIDEBAR);
+ }
gtk_notebook_append_page_menu (GTK_NOTEBOOK (panel->priv->notebook),
item,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]