[gtk+/wip/css: 163/167] css: Add outline CSS properties
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/css: 163/167] css: Add outline CSS properties
- Date: Sun, 8 Jan 2012 21:36:34 +0000 (UTC)
commit 4fe50c3a7f15fe5d7533db5047ddd70b7b92ffce
Author: Benjamin Otte <otte redhat com>
Date: Sun Jan 8 02:10:35 2012 +0100
css: Add outline CSS properties
gtk/gtkcssshorthandpropertyimpl.c | 7 +++++++
gtk/gtkcssstylepropertyimpl.c | 29 +++++++++++++++++++++++++++++
2 files changed, 36 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssshorthandpropertyimpl.c b/gtk/gtkcssshorthandpropertyimpl.c
index 8a9288c..e1b80b9 100644
--- a/gtk/gtkcssshorthandpropertyimpl.c
+++ b/gtk/gtkcssshorthandpropertyimpl.c
@@ -920,6 +920,7 @@ _gtk_css_shorthand_property_init_properties (void)
"border-top-style", "border-right-style", "border-bottom-style", "border-left-style",
"border-top-color", "border-right-color", "border-bottom-color", "border-left-color",
"border-image-source", "border-image-slice", "border-image-width", "border-image-repeat", NULL };
+ const char *outline_subproperties[] = { "outline-width", "outline-style", "outline-color", NULL };
const char *background_subproperties[] = { "background-image", "background-repeat", "background-clip", "background-origin",
"background-color", NULL };
@@ -1001,6 +1002,12 @@ _gtk_css_shorthand_property_init_properties (void)
parse_border,
NULL,
NULL);
+ _gtk_css_shorthand_property_register ("outline",
+ G_TYPE_NONE,
+ outline_subproperties,
+ parse_border_side,
+ NULL,
+ NULL);
_gtk_css_shorthand_property_register ("background",
G_TYPE_NONE,
background_subproperties,
diff --git a/gtk/gtkcssstylepropertyimpl.c b/gtk/gtkcssstylepropertyimpl.c
index 7638f94..2cb5ac1 100644
--- a/gtk/gtkcssstylepropertyimpl.c
+++ b/gtk/gtkcssstylepropertyimpl.c
@@ -769,6 +769,28 @@ _gtk_css_style_property_init_properties (void)
NULL,
&no_corner_radius);
+ gtk_style_property_register ("outline-style",
+ GTK_TYPE_BORDER_STYLE,
+ 0,
+ NULL,
+ NULL,
+ NULL,
+ GTK_BORDER_STYLE_NONE);
+ gtk_style_property_register ("outline-width",
+ G_TYPE_INT,
+ 0,
+ NULL,
+ NULL,
+ compute_border_width,
+ 0);
+ gtk_style_property_register ("outline-offset",
+ G_TYPE_INT,
+ 0,
+ NULL,
+ NULL,
+ NULL,
+ 0);
+
gtk_style_property_register ("background-clip",
GTK_TYPE_CSS_AREA,
0,
@@ -815,6 +837,13 @@ _gtk_css_style_property_init_properties (void)
NULL,
color_compute,
&value);
+ _gtk_style_property_register ("outline-color",
+ GDK_TYPE_RGBA,
+ 0,
+ NULL,
+ NULL,
+ color_compute,
+ &value);
g_value_unset (&value);
gtk_style_property_register ("background-repeat",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]