diff options
author | William Jon McCann <william.jon.mccann@gmail.com> | 2013-10-16 12:03:33 -0400 |
---|---|---|
committer | William Jon McCann <william.jon.mccann@gmail.com> | 2013-10-16 12:03:33 -0400 |
commit | 05b1ea84b49c7046073463a5a19fb8b0e02dd0cb (patch) | |
tree | b91a2879507fa9317631b18fd67f02fc89fefc61 /gtk/gtknotebook.c | |
parent | 05cc3b6df6360815bba14737d58452524a22ed96 (diff) | |
download | gtk+-05b1ea84b49c7046073463a5a19fb8b0e02dd0cb.tar.gz |
notebook: inform the theme whether show-borders was set
So that it can draw a border or not. If show-borders=true then
the notebook will have GTK_STYLE_CLASS_FRAME.
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r-- | gtk/gtknotebook.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index f958d8229b..2b0f914362 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -5189,10 +5189,14 @@ gtk_notebook_paint (GtkWidget *widget, if (priv->show_border && (!priv->show_tabs || !priv->children)) { + gtk_style_context_save (context); + gtk_style_context_add_class (context, GTK_STYLE_CLASS_FRAME); + gtk_render_background (context, cr, x, y, width, height); gtk_render_frame (context, cr, x, y, width, height); + gtk_style_context_restore (context); return; } @@ -5332,6 +5336,9 @@ gtk_notebook_paint (GtkWidget *widget, "has-tab-gap", &has_tab_gap, NULL); + if (priv->show_border) + gtk_style_context_add_class (context, GTK_STYLE_CLASS_FRAME); + gtk_render_background (context, cr, x, y, width, height); if (has_tab_gap) |