[gtk+] notebook: render a frame and background in the header
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] notebook: render a frame and background in the header
- Date: Thu, 26 Sep 2013 23:28:33 +0000 (UTC)
commit 71ad9a8fdd8aaa9019e05de58b38253da02b1b2e
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Sat Mar 5 03:03:45 2011 -0500
notebook: render a frame and background in the header
And use the "header" style class to do that.
This allows themes to set e.g. the background of the tab header
differently.
Themes will need slight adjustment to make things appear
as before.
https://bugzilla.gnome.org/show_bug.cgi?id=643914
gtk/gtknotebook.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c
index 27880c4..f008101 100644
--- a/gtk/gtknotebook.c
+++ b/gtk/gtknotebook.c
@@ -5163,6 +5163,14 @@ gtk_notebook_paint (GtkWidget *widget,
else
page = priv->cur_page;
+ gtk_style_context_save (context);
+ gtk_style_context_add_class (context, GTK_STYLE_CLASS_HEADER);
+ gtk_render_background (context, cr,
+ x, y, width, page->allocation.height);
+ gtk_render_frame (context, cr,
+ x, y, width, page->allocation.height);
+ gtk_style_context_restore (context);
+
switch (tab_pos)
{
case GTK_POS_TOP:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]