diff options
author | William Jon McCann <william.jon.mccann@gmail.com> | 2013-10-04 17:53:55 -0400 |
---|---|---|
committer | William Jon McCann <william.jon.mccann@gmail.com> | 2013-10-04 18:14:25 -0400 |
commit | 053433010bfb6b4542652453ad1580c5f2e7525b (patch) | |
tree | 082ee5110e043b7c69ee1ed8aa6458a9ac93b5c3 /gtk/gtknotebook.c | |
parent | db60046af4d5f1be6d99896c4c6dd612ae03fe3e (diff) | |
download | gtk+-053433010bfb6b4542652453ad1580c5f2e7525b.tar.gz |
notebook: add style classes for orientation to the header
Diffstat (limited to 'gtk/gtknotebook.c')
-rw-r--r-- | gtk/gtknotebook.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 97a8f30a1d..0f113c4cc0 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -5209,31 +5209,36 @@ gtk_notebook_paint (GtkWidget *widget, header_width = width; header_height = height; + gtk_style_context_save (context); + switch (tab_pos) { case GTK_POS_TOP: + gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOP); y += page->allocation.height; height -= page->allocation.height; header_height = page->allocation.height; break; case GTK_POS_BOTTOM: + gtk_style_context_add_class (context, GTK_STYLE_CLASS_BOTTOM); height -= page->allocation.height; header_y += height; header_height = page->allocation.height; break; case GTK_POS_LEFT: + gtk_style_context_add_class (context, GTK_STYLE_CLASS_LEFT); x += page->allocation.width; width -= page->allocation.width; header_width = page->allocation.width; break; case GTK_POS_RIGHT: + gtk_style_context_add_class (context, GTK_STYLE_CLASS_RIGHT); width -= page->allocation.width; header_width = page->allocation.width; header_x += width; break; } - gtk_style_context_save (context); gtk_style_context_add_class (context, GTK_STYLE_CLASS_HEADER); gtk_render_background (context, cr, header_x, header_y, header_width, header_height); |