[gtk/wip/baedert/for-master: 61/64] cssdimensionvalue: Add 50% singleton
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 61/64] cssdimensionvalue: Add 50% singleton
- Date: Thu, 7 Nov 2019 06:34:38 +0000 (UTC)
commit 12ae78c5653457fe30641fd0fb51dfa8081184ac
Author: Timm Bäder <mail baedert org>
Date: Thu Nov 7 07:30:42 2019 +0100
cssdimensionvalue: Add 50% singleton
Also pretty common
gtk/gtkcssdimensionvalue.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkcssdimensionvalue.c b/gtk/gtkcssdimensionvalue.c
index 3c4c9a1705..61a0e1926b 100644
--- a/gtk/gtkcssdimensionvalue.c
+++ b/gtk/gtkcssdimensionvalue.c
@@ -311,6 +311,7 @@ gtk_css_dimension_value_new (double value,
};
static GtkCssValue percent_singletons[] = {
{ >K_CSS_VALUE_DIMENSION.value_class, 1, GTK_CSS_PERCENT, 0 },
+ { >K_CSS_VALUE_DIMENSION.value_class, 1, GTK_CSS_PERCENT, 50 },
{ >K_CSS_VALUE_DIMENSION.value_class, 1, GTK_CSS_PERCENT, 100 },
};
static GtkCssValue second_singletons[] = {
@@ -351,9 +352,10 @@ gtk_css_dimension_value_new (double value,
case GTK_CSS_PERCENT:
if (value == 0)
return _gtk_css_value_ref (&percent_singletons[0]);
-
- if (value == 100)
+ if (value == 50)
return _gtk_css_value_ref (&percent_singletons[1]);
+ if (value == 100)
+ return _gtk_css_value_ref (&percent_singletons[2]);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]