diff --git a/make-xges.py b/make-xges.py index 99bc8e2..9cc3d4f 100755 --- a/make-xges.py +++ b/make-xges.py @@ -176,7 +176,7 @@ def add_webcams(self): def _clean_shape(self, shape): # Shapes are hidden by default, as the JavaScript player would # make the visible as appropriate. - shape.set('style', shape.get('style').replace('visibility:hidden;', '')) + style = shape.get('style').replace('visibility:hidden;', '') # Add an SVG fallback to text shapes switch = shape.find('./{http://www.w3.org/2000/svg}switch') @@ -198,10 +198,12 @@ def _clean_shape(self, shape): tspan.text = line text.append(tspan) - shape.set('style', shape.get('style').replace('color:', 'fill:')) + style += ';fill:currentcolor'.replace('color:', 'fill:') shape.remove(switch) shape.append(text) + shape.set('style', style) + def add_slides(self, with_annotations): layer = self._add_layer('Slides') doc = ET.parse(os.path.join(self.opts.basedir, 'shapes.svg'))