diff options
author | Benjamin Otte <otte@redhat.com> | 2012-03-30 03:51:25 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2012-04-17 08:59:15 +0200 |
commit | bf92f2f7ac5ac55b7ae4b59d8cd3a449d9ab5b20 (patch) | |
tree | f4671a65bcadb948c611079740e23cedfde2f7ee /gtk/gtkcsstypes.c | |
parent | ad05604b3e4716a093f7b2099b1990fb5f13c91a (diff) | |
download | gtk+-bf92f2f7ac5ac55b7ae4b59d8cd3a449d9ab5b20.tar.gz |
cssvalue: Do a hacky conversion of font-size to a number value
Just store the value as px for now.
The font-size property needs a complete makeover anyway.
Diffstat (limited to 'gtk/gtkcsstypes.c')
-rw-r--r-- | gtk/gtkcsstypes.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gtk/gtkcsstypes.c b/gtk/gtkcsstypes.c index a47f8d3edd..411f401693 100644 --- a/gtk/gtkcsstypes.c +++ b/gtk/gtkcsstypes.c @@ -18,6 +18,8 @@ #include "config.h" #include "gtkcsstypesprivate.h" + +#include "gtkcssnumbervalueprivate.h" #include "gtkstylecontextprivate.h" #define DEFINE_BOXED_TYPE_WITH_COPY_FUNC(TypeName, type_name) \ @@ -156,12 +158,12 @@ _gtk_css_number_compute (GtkCssNumber *dest, dest->unit = GTK_CSS_PX; break; case GTK_CSS_EM: - dest->value = src->value * _gtk_css_value_get_double (_gtk_style_context_peek_property (context, "font-size")); + dest->value = src->value * _gtk_css_number_value_get (_gtk_style_context_peek_property (context, "font-size"), 100); dest->unit = GTK_CSS_PX; break; case GTK_CSS_EX: /* for now we pretend ex is half of em */ - dest->value = src->value * _gtk_css_value_get_double (_gtk_style_context_peek_property (context, "font-size")); + dest->value = src->value * _gtk_css_number_value_get (_gtk_style_context_peek_property (context, "font-size"), 100); dest->unit = GTK_CSS_PX; break; case GTK_CSS_RAD: |