styleproperty: Mark properties as not needing resizes

This commit is contained in:
Benjamin Otte 2012-11-30 19:00:23 +01:00
parent a5770cef36
commit 66d22f101d

View File

@ -65,7 +65,8 @@
typedef enum {
GTK_STYLE_PROPERTY_INHERIT = (1 << 0),
GTK_STYLE_PROPERTY_ANIMATED = (1 << 1)
GTK_STYLE_PROPERTY_ANIMATED = (1 << 1),
GTK_STYLE_PROPERTY_NO_RESIZE = (1 << 2)
} GtkStylePropertyFlags;
static void
@ -87,6 +88,7 @@ gtk_css_style_property_register (const char * name,
node = g_object_new (GTK_TYPE_CSS_STYLE_PROPERTY,
"value-type", value_type,
"affects-size", (flags & GTK_STYLE_PROPERTY_NO_RESIZE) ? FALSE : TRUE,
"animated", (flags & GTK_STYLE_PROPERTY_ANIMATED) ? TRUE : FALSE,
"inherit", (flags & GTK_STYLE_PROPERTY_INHERIT) ? TRUE : FALSE,
"initial-value", initial_value,
@ -864,7 +866,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("color",
GTK_CSS_PROPERTY_COLOR,
GDK_TYPE_RGBA,
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
color_parse,
color_query,
color_assign,
@ -884,7 +886,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("background-color",
GTK_CSS_PROPERTY_BACKGROUND_COLOR,
GDK_TYPE_RGBA,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
color_parse,
color_query,
color_assign,
@ -926,7 +928,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("text-shadow",
GTK_CSS_PROPERTY_TEXT_SHADOW,
G_TYPE_NONE,
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
shadow_value_parse,
NULL,
NULL,
@ -935,7 +937,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("icon-shadow",
GTK_CSS_PROPERTY_ICON_SHADOW,
G_TYPE_NONE,
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
shadow_value_parse,
NULL,
NULL,
@ -944,7 +946,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("box-shadow",
GTK_CSS_PROPERTY_BOX_SHADOW,
G_TYPE_NONE,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
shadow_value_parse,
NULL,
NULL,
@ -1020,7 +1022,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-top-style",
GTK_CSS_PROPERTY_BORDER_TOP_STYLE,
GTK_TYPE_BORDER_STYLE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
parse_border_style,
query_border_style,
assign_border_style,
@ -1028,7 +1030,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-top-width",
GTK_CSS_PROPERTY_BORDER_TOP_WIDTH,
G_TYPE_INT,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
parse_border_width,
query_length_as_int,
assign_length_from_int,
@ -1036,7 +1038,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-left-style",
GTK_CSS_PROPERTY_BORDER_LEFT_STYLE,
GTK_TYPE_BORDER_STYLE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
parse_border_style,
query_border_style,
assign_border_style,
@ -1044,7 +1046,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-left-width",
GTK_CSS_PROPERTY_BORDER_LEFT_WIDTH,
G_TYPE_INT,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
parse_border_width,
query_length_as_int,
assign_length_from_int,
@ -1052,7 +1054,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-bottom-style",
GTK_CSS_PROPERTY_BORDER_BOTTOM_STYLE,
GTK_TYPE_BORDER_STYLE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
parse_border_style,
query_border_style,
assign_border_style,
@ -1060,7 +1062,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-bottom-width",
GTK_CSS_PROPERTY_BORDER_BOTTOM_WIDTH,
G_TYPE_INT,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
parse_border_width,
query_length_as_int,
assign_length_from_int,
@ -1068,7 +1070,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-right-style",
GTK_CSS_PROPERTY_BORDER_RIGHT_STYLE,
GTK_TYPE_BORDER_STYLE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
parse_border_style,
query_border_style,
assign_border_style,
@ -1076,7 +1078,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-right-width",
GTK_CSS_PROPERTY_BORDER_RIGHT_WIDTH,
G_TYPE_INT,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
parse_border_width,
query_length_as_int,
assign_length_from_int,
@ -1085,7 +1087,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-top-left-radius",
GTK_CSS_PROPERTY_BORDER_TOP_LEFT_RADIUS,
G_TYPE_NONE,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
border_corner_radius_value_parse,
NULL,
NULL,
@ -1094,7 +1096,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-top-right-radius",
GTK_CSS_PROPERTY_BORDER_TOP_RIGHT_RADIUS,
G_TYPE_NONE,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
border_corner_radius_value_parse,
NULL,
NULL,
@ -1103,7 +1105,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-bottom-right-radius",
GTK_CSS_PROPERTY_BORDER_BOTTOM_RIGHT_RADIUS,
G_TYPE_NONE,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
border_corner_radius_value_parse,
NULL,
NULL,
@ -1112,7 +1114,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-bottom-left-radius",
GTK_CSS_PROPERTY_BORDER_BOTTOM_LEFT_RADIUS,
G_TYPE_NONE,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
border_corner_radius_value_parse,
NULL,
NULL,
@ -1122,7 +1124,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("outline-style",
GTK_CSS_PROPERTY_OUTLINE_STYLE,
GTK_TYPE_BORDER_STYLE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
parse_border_style,
query_border_style,
assign_border_style,
@ -1130,7 +1132,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("outline-width",
GTK_CSS_PROPERTY_OUTLINE_WIDTH,
G_TYPE_INT,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
parse_border_width,
query_length_as_int,
assign_length_from_int,
@ -1138,7 +1140,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("outline-offset",
GTK_CSS_PROPERTY_OUTLINE_OFFSET,
G_TYPE_INT,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
outline_parse,
query_length_as_int,
assign_length_from_int,
@ -1147,7 +1149,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("background-clip",
GTK_CSS_PROPERTY_BACKGROUND_CLIP,
G_TYPE_NONE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
parse_css_area,
NULL,
NULL,
@ -1155,7 +1157,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("background-origin",
GTK_CSS_PROPERTY_BACKGROUND_ORIGIN,
G_TYPE_NONE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
parse_css_area,
NULL,
NULL,
@ -1163,7 +1165,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("background-size",
GTK_CSS_PROPERTY_BACKGROUND_SIZE,
G_TYPE_NONE,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
background_size_parse,
NULL,
NULL,
@ -1171,7 +1173,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("background-position",
GTK_CSS_PROPERTY_BACKGROUND_POSITION,
G_TYPE_NONE,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
background_position_parse,
NULL,
NULL,
@ -1181,7 +1183,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-top-color",
GTK_CSS_PROPERTY_BORDER_TOP_COLOR,
GDK_TYPE_RGBA,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
color_parse,
color_query,
color_assign,
@ -1189,7 +1191,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-right-color",
GTK_CSS_PROPERTY_BORDER_RIGHT_COLOR,
GDK_TYPE_RGBA,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
color_parse,
color_query,
color_assign,
@ -1197,7 +1199,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-bottom-color",
GTK_CSS_PROPERTY_BORDER_BOTTOM_COLOR,
GDK_TYPE_RGBA,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
color_parse,
color_query,
color_assign,
@ -1205,7 +1207,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-left-color",
GTK_CSS_PROPERTY_BORDER_LEFT_COLOR,
GDK_TYPE_RGBA,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
color_parse,
color_query,
color_assign,
@ -1213,7 +1215,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("outline-color",
GTK_CSS_PROPERTY_OUTLINE_COLOR,
GDK_TYPE_RGBA,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
color_parse,
color_query,
color_assign,
@ -1222,7 +1224,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("background-repeat",
GTK_CSS_PROPERTY_BACKGROUND_REPEAT,
G_TYPE_NONE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
background_repeat_value_parse,
NULL,
NULL,
@ -1231,7 +1233,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("background-image",
GTK_CSS_PROPERTY_BACKGROUND_IMAGE,
CAIRO_GOBJECT_TYPE_PATTERN,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
background_image_value_parse,
background_image_value_query,
background_image_value_assign,
@ -1240,7 +1242,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-image-source",
GTK_CSS_PROPERTY_BORDER_IMAGE_SOURCE,
CAIRO_GOBJECT_TYPE_PATTERN,
GTK_STYLE_PROPERTY_ANIMATED,
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_NO_RESIZE,
css_image_value_parse,
css_image_value_query,
css_image_value_assign,
@ -1248,7 +1250,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-image-repeat",
GTK_CSS_PROPERTY_BORDER_IMAGE_REPEAT,
G_TYPE_NONE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
border_image_repeat_parse,
NULL,
NULL,
@ -1258,7 +1260,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-image-slice",
GTK_CSS_PROPERTY_BORDER_IMAGE_SLICE,
GTK_TYPE_BORDER,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
border_image_slice_parse,
query_border,
assign_border,
@ -1269,7 +1271,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("border-image-width",
GTK_CSS_PROPERTY_BORDER_IMAGE_WIDTH,
GTK_TYPE_BORDER,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
border_image_width_parse,
query_border,
assign_border,
@ -1281,7 +1283,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("transition-property",
GTK_CSS_PROPERTY_TRANSITION_PROPERTY,
G_TYPE_NONE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
transition_property_parse,
NULL,
NULL,
@ -1289,7 +1291,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("transition-duration",
GTK_CSS_PROPERTY_TRANSITION_DURATION,
G_TYPE_NONE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
transition_time_parse,
NULL,
NULL,
@ -1297,7 +1299,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("transition-timing-function",
GTK_CSS_PROPERTY_TRANSITION_TIMING_FUNCTION,
G_TYPE_NONE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
transition_timing_function_parse,
NULL,
NULL,
@ -1306,7 +1308,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("transition-delay",
GTK_CSS_PROPERTY_TRANSITION_DELAY,
G_TYPE_NONE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
transition_time_parse,
NULL,
NULL,
@ -1315,7 +1317,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("animation-name",
GTK_CSS_PROPERTY_ANIMATION_NAME,
G_TYPE_NONE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
transition_property_parse,
NULL,
NULL,
@ -1323,7 +1325,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("animation-duration",
GTK_CSS_PROPERTY_ANIMATION_DURATION,
G_TYPE_NONE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
transition_time_parse,
NULL,
NULL,
@ -1331,7 +1333,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("animation-timing-function",
GTK_CSS_PROPERTY_ANIMATION_TIMING_FUNCTION,
G_TYPE_NONE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
transition_timing_function_parse,
NULL,
NULL,
@ -1340,7 +1342,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("animation-iteration-count",
GTK_CSS_PROPERTY_ANIMATION_ITERATION_COUNT,
G_TYPE_NONE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
iteration_count_parse,
NULL,
NULL,
@ -1348,7 +1350,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("animation-direction",
GTK_CSS_PROPERTY_ANIMATION_DIRECTION,
G_TYPE_NONE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
parse_css_direction,
NULL,
NULL,
@ -1356,7 +1358,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("animation-play-state",
GTK_CSS_PROPERTY_ANIMATION_PLAY_STATE,
G_TYPE_NONE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
parse_css_play_state,
NULL,
NULL,
@ -1364,7 +1366,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("animation-delay",
GTK_CSS_PROPERTY_ANIMATION_DELAY,
G_TYPE_NONE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
transition_time_parse,
NULL,
NULL,
@ -1372,7 +1374,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("animation-fill-mode",
GTK_CSS_PROPERTY_ANIMATION_FILL_MODE,
G_TYPE_NONE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
parse_css_fill_mode,
NULL,
NULL,
@ -1381,7 +1383,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("engine",
GTK_CSS_PROPERTY_ENGINE,
GTK_TYPE_THEMING_ENGINE,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
engine_parse,
engine_query,
engine_assign,
@ -1391,7 +1393,7 @@ _gtk_css_style_property_init_properties (void)
gtk_css_style_property_register ("gtk-key-bindings",
GTK_CSS_PROPERTY_GTK_KEY_BINDINGS,
G_TYPE_PTR_ARRAY,
0,
GTK_STYLE_PROPERTY_NO_RESIZE,
bindings_value_parse,
bindings_value_query,
bindings_value_assign,