[gtk+] stylecontext: add style classes for top/bottom/right/left areas
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] stylecontext: add style classes for top/bottom/right/left areas
- Date: Tue, 27 Sep 2011 17:44:21 +0000 (UTC)
commit 8d3f7e3a4a5963005cff1609f4b78f0c8856d585
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Sep 21 20:13:49 2011 -0400
stylecontext: add style classes for top/bottom/right/left areas
This is useful to e.g. theme notebook tabs differently according to
their position directly from the CSS sheet.
GtkNotebook support in a separate commit.
https://bugzilla.gnome.org/show_bug.cgi?id=659777
docs/reference/gtk/gtk3-sections.txt | 4 +++
gtk/gtkstylecontext.c | 6 ++++-
gtk/gtkstylecontext.h | 39 ++++++++++++++++++++++++++++++++++
3 files changed, 48 insertions(+), 1 deletions(-)
---
diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt
index 6ee269d..3fdfeed 100644
--- a/docs/reference/gtk/gtk3-sections.txt
+++ b/docs/reference/gtk/gtk3-sections.txt
@@ -5652,6 +5652,10 @@ GTK_STYLE_CLASS_VIEW
GTK_STYLE_CLASS_WARNING
GTK_STYLE_CLASS_HORIZONTAL
GTK_STYLE_CLASS_VERTICAL
+GTK_STYLE_CLASS_TOP
+GTK_STYLE_CLASS_BOTTOM
+GTK_STYLE_CLASS_LEFT
+GTK_STYLE_CLASS_RIGHT
GTK_STYLE_REGION_COLUMN
GTK_STYLE_REGION_COLUMN_HEADER
GTK_STYLE_REGION_ROW
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index f5f9009..97e9f30 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -222,7 +222,11 @@
* #GTK_STYLE_CLASS_QUESTION,
* #GTK_STYLE_CLASS_ERROR,
* #GTK_STYLE_CLASS_HORIZONTAL,
- * #GTK_STYLE_CLASS_VERTICAL.
+ * #GTK_STYLE_CLASS_VERTICAL,
+ * #GTK_STYLE_CLASS_TOP,
+ * #GTK_STYLE_CLASS_BOTTOM,
+ * #GTK_STYLE_CLASS_LEFT,
+ * #GTK_STYLE_CLASS_RIGHT,
* </para>
* <para>
* Widgets can also add regions with flags to their context.
diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h
index 3e32c68..33cf556 100644
--- a/gtk/gtkstylecontext.h
+++ b/gtk/gtkstylecontext.h
@@ -600,6 +600,45 @@ struct _GtkStyleContextClass
*/
#define GTK_STYLE_CLASS_VERTICAL "vertical"
+/**
+ * GTK_STYLE_CLASS_TOP:
+ *
+ * A CSS class to indicate an area at the top of a widget.
+ *
+ * This is used by widgets that can render an area in different
+ * positions, such as tabs in a #GtkNotebook.
+ */
+#define GTK_STYLE_CLASS_TOP "top"
+
+/**
+ * GTK_STYLE_CLASS_BOTTOM:
+ *
+ * A CSS class to indicate an area at the bottom of a widget.
+ *
+ * This is used by widgets that can render an area in different
+ * positions, such as tabs in a #GtkNotebook.
+ */
+#define GTK_STYLE_CLASS_BOTTOM "bottom"
+
+/**
+ * GTK_STYLE_CLASS_LEFT:
+ *
+ * A CSS class to indicate an area at the left of a widget.
+ *
+ * This is used by widgets that can render an area in different
+ * positions, such as tabs in a #GtkNotebook.
+ */
+#define GTK_STYLE_CLASS_LEFT "left"
+
+/**
+ * GTK_STYLE_CLASS_RIGHT:
+ *
+ * A CSS class to indicate an area at the right of a widget.
+ *
+ * This is used by widgets that can render an area in different
+ * positions, such as tabs in a #GtkNotebook.
+ */
+#define GTK_STYLE_CLASS_RIGHT "right"
/* Predefined set of widget regions */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]