summaryrefslogtreecommitdiff
path: root/gtk/gtkcssshorthandpropertyimpl.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2018-07-03 23:17:41 +0200
committerBenjamin Otte <otte@redhat.com>2018-07-04 06:15:33 +0200
commitfba0b359d48493efc19dab5d35926f5e55e4c9d5 (patch)
treec7b56759834462611e903c80e87e414ae3d5c5ff /gtk/gtkcssshorthandpropertyimpl.c
parente1b6496af760d4b93a2a17c80816dc1a3348b97c (diff)
downloadgtk+-fba0b359d48493efc19dab5d35926f5e55e4c9d5.tar.gz
css: Report sizes as absolute
All PangoFontDescriptions that GTK creates now use pango_font_description_set_absolute_size().
Diffstat (limited to 'gtk/gtkcssshorthandpropertyimpl.c')
-rw-r--r--gtk/gtkcssshorthandpropertyimpl.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gtk/gtkcssshorthandpropertyimpl.c b/gtk/gtkcssshorthandpropertyimpl.c
index aad46d8679..f5c078009b 100644
--- a/gtk/gtkcssshorthandpropertyimpl.c
+++ b/gtk/gtkcssshorthandpropertyimpl.c
@@ -1101,7 +1101,6 @@ pack_font_description (GtkCssShorthandProperty *shorthand,
{
PangoFontDescription *description;
GtkCssValue *v;
- double dpi;
description = pango_font_description_new ();
@@ -1112,11 +1111,9 @@ pack_font_description (GtkCssShorthandProperty *shorthand,
pango_font_description_set_family (description, _gtk_css_string_value_get (_gtk_css_array_value_get_nth (v, 0)));
}
- v = (* query_func) (_gtk_css_style_property_get_id (GTK_CSS_STYLE_PROPERTY (_gtk_style_property_lookup ("-gtk-dpi"))), query_data);
- dpi = _gtk_css_number_value_get (v, 96);
v = (* query_func) (_gtk_css_style_property_get_id (GTK_CSS_STYLE_PROPERTY (_gtk_style_property_lookup ("font-size"))), query_data);
if (v)
- pango_font_description_set_size (description, round (_gtk_css_number_value_get (v, 100) * PANGO_SCALE * 72 / dpi));
+ pango_font_description_set_absolute_size (description, round (_gtk_css_number_value_get (v, 100) * PANGO_SCALE));
v = (* query_func) (_gtk_css_style_property_get_id (GTK_CSS_STYLE_PROPERTY (_gtk_style_property_lookup ("font-style"))), query_data);
if (v)