[lasem] menclose: fix notation color and background



commit 677627398ead633495859927fc4b6d42df0fe28c
Author: Emmanuel Pacaud <emmanuel gnome org>
Date:   Tue Feb 3 23:19:10 2015 +0100

    menclose: fix notation color and background

 src/lsmmathmlencloseelement.c |   14 ++++++++++++++
 src/lsmmathmlencloseelement.h |    2 ++
 2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/src/lsmmathmlencloseelement.c b/src/lsmmathmlencloseelement.c
index fa0e745..7446369 100644
--- a/src/lsmmathmlencloseelement.c
+++ b/src/lsmmathmlencloseelement.c
@@ -39,6 +39,10 @@ _get_node_name (LsmDomNode *node)
 static void
 _update (LsmMathmlElement *self, LsmMathmlStyle *style)
 {
+       LsmMathmlEncloseElement *enclose = LSM_MATHML_ENCLOSE_ELEMENT (self);
+
+       style->math_color = lsm_mathml_color_attribute_inherit (&enclose->math_color, style->math_color);
+       style->math_background = lsm_mathml_color_attribute_inherit (&enclose->math_background, 
style->math_background);
 }
 
 static const LsmMathmlBbox *
@@ -100,6 +104,16 @@ static const LsmAttributeInfos _attribute_infos[] = {
                .attribute_offset = offsetof (LsmMathmlEncloseElement, notation),
                .trait_class = &lsm_mathml_notation_trait_class,
                .trait_default = &notation_default
+       },
+       {
+               .name = "mathcolor",
+               .attribute_offset = offsetof (LsmMathmlEncloseElement, math_color),
+               .trait_class = &lsm_mathml_color_trait_class,
+       },
+       {
+               .name = "mathbackground",
+               .attribute_offset = offsetof (LsmMathmlEncloseElement, math_background),
+               .trait_class = &lsm_mathml_color_trait_class,
        }
 };
 
diff --git a/src/lsmmathmlencloseelement.h b/src/lsmmathmlencloseelement.h
index 55e3dbe..956a37c 100644
--- a/src/lsmmathmlencloseelement.h
+++ b/src/lsmmathmlencloseelement.h
@@ -42,6 +42,8 @@ struct _LsmMathmlEncloseElement {
        LsmMathmlPresentationContainer presentation_container;
 
        LsmMathmlEnumAttribute notation;
+       LsmMathmlColorAttribute math_color;
+       LsmMathmlColorAttribute math_background;
 
        /* View data */
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]