[gtk/wip/baedert/for-master: 60/64] cssdimensionvalue: Add more common pixel values
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 60/64] cssdimensionvalue: Add more common pixel values
- Date: Thu, 7 Nov 2019 06:34:32 +0000 (UTC)
commit 8b6aad4806ac97d170dc00386b426383fc4d9bde
Author: Timm Bäder <mail baedert org>
Date: Thu Nov 7 07:29:45 2019 +0100
cssdimensionvalue: Add more common pixel values
These are used for icon sizes, etc.
gtk/gtkcssdimensionvalue.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkcssdimensionvalue.c b/gtk/gtkcssdimensionvalue.c
index 4108a248c8..3c4c9a1705 100644
--- a/gtk/gtkcssdimensionvalue.c
+++ b/gtk/gtkcssdimensionvalue.c
@@ -304,7 +304,10 @@ gtk_css_dimension_value_new (double value,
{ >K_CSS_VALUE_DIMENSION.value_class, 1, GTK_CSS_PX, 2 },
{ >K_CSS_VALUE_DIMENSION.value_class, 1, GTK_CSS_PX, 3 },
{ >K_CSS_VALUE_DIMENSION.value_class, 1, GTK_CSS_PX, 4 },
+ { >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, 64 },
};
static GtkCssValue percent_singletons[] = {
{ >K_CSS_VALUE_DIMENSION.value_class, 1, GTK_CSS_PERCENT, 0 },
@@ -334,8 +337,14 @@ gtk_css_dimension_value_new (double value,
value == 3 ||
value == 4)
return _gtk_css_value_ref (&px_singletons[(int) value]);
- else if (value == 16)
+ if (value == 8)
return _gtk_css_value_ref (&px_singletons[5]);
+ if (value == 16)
+ return _gtk_css_value_ref (&px_singletons[6]);
+ if (value == 32)
+ return _gtk_css_value_ref (&px_singletons[7]);
+ if (value == 64)
+ return _gtk_css_value_ref (&px_singletons[8]);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]