[gtk/matthiasc/css-values: 2/2] css: Make the common font size singletons
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/css-values: 2/2] css: Make the common font size singletons
- Date: Fri, 10 Jan 2020 13:33:21 +0000 (UTC)
commit c0ec0f0f25239e250aee89cc6197f035f1d713b2
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Jan 10 08:28:08 2020 -0500
css: Make the common font size singletons
gtk/gtkcssdimensionvalue.c | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/gtk/gtkcssdimensionvalue.c b/gtk/gtkcssdimensionvalue.c
index c29f361c6a..0ed99339e2 100644
--- a/gtk/gtkcssdimensionvalue.c
+++ b/gtk/gtkcssdimensionvalue.c
@@ -317,6 +317,8 @@ gtk_css_dimension_value_new (double value,
{ >K_CSS_VALUE_DIMENSION.value_class, 1, GTK_CSS_PX, 8 },
{ >K_CSS_VALUE_DIMENSION.value_class, 1, GTK_CSS_PX, 16 }, /* Icon size default */
{ >K_CSS_VALUE_DIMENSION.value_class, 1, GTK_CSS_PX, 32 },
+ { >K_CSS_VALUE_DIMENSION.value_class, 1, GTK_CSS_PX, 10 * 96.0 / 72.0 }, /* font size 10 */
+ { >K_CSS_VALUE_DIMENSION.value_class, 1, GTK_CSS_PX, 11 * 96.0 / 72.0 }, /* font size 11 */
};
static GtkCssValue percent_singletons[] = {
{ >K_CSS_VALUE_DIMENSION.value_class, 1, GTK_CSS_PERCENT, 0 },
@@ -364,6 +366,10 @@ gtk_css_dimension_value_new (double value,
return _gtk_css_value_ref (&px_singletons[9]);
if (value == 32)
return _gtk_css_value_ref (&px_singletons[10]);
+ if (value == 10 * 96.0 / 72.0)
+ return _gtk_css_value_ref (&px_singletons[11]);
+ if (value == 11 * 96.0 / 72.0)
+ return _gtk_css_value_ref (&px_singletons[12]);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]