summaryrefslogtreecommitdiff
path: root/gtk/gtkcssnumbervalue.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-08-25 01:59:13 +0200
committerBenjamin Otte <otte@redhat.com>2012-08-28 15:42:24 +0200
commit012526241a1024256459c127065603a5fd11cfd3 (patch)
tree9050fe32f138ff58fff2e5acb6a355cc86e34236 /gtk/gtkcssnumbervalue.c
parent8ff08e7c5e7da785a37c56018b1ae4b57cb77e64 (diff)
downloadgtk+-012526241a1024256459c127065603a5fd11cfd3.tar.gz
cssvalue: First step of proper dependency tracking
Instead of using the EVERYTHING aka FIXME value for tdependencies, actually compute the dependencies in a bunch of simple cases.
Diffstat (limited to 'gtk/gtkcssnumbervalue.c')
-rw-r--r--gtk/gtkcssnumbervalue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gtk/gtkcssnumbervalue.c b/gtk/gtkcssnumbervalue.c
index 535c20587f..db9e154a77 100644
--- a/gtk/gtkcssnumbervalue.c
+++ b/gtk/gtkcssnumbervalue.c
@@ -74,8 +74,6 @@ gtk_css_value_number_compute (GtkCssValue *number,
break;
}
- *dependencies = GTK_CSS_DEPENDS_ON_EVERYTHING;
-
switch (number->unit)
{
default:
@@ -107,12 +105,14 @@ gtk_css_value_number_compute (GtkCssValue *number,
GTK_CSS_PX);
break;
case GTK_CSS_EM:
+ *dependencies = GTK_CSS_DEPENDS_ON_FONT_SIZE;
return _gtk_css_number_value_new (number->value *
_gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_FONT_SIZE), 100),
GTK_CSS_PX);
break;
case GTK_CSS_EX:
/* for now we pretend ex is half of em */
+ *dependencies = GTK_CSS_DEPENDS_ON_FONT_SIZE;
return _gtk_css_number_value_new (number->value * 0.5 *
_gtk_css_number_value_get (_gtk_style_context_peek_property (context, GTK_CSS_PROPERTY_FONT_SIZE), 100),
GTK_CSS_PX);