Skip to content

Commit f040252

Browse files
committed
make-xges: use 'fill:currentcolor' to set text colour
1 parent ef9976e commit f040252

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

make-xges.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def add_webcams(self):
176176
def _clean_shape(self, shape):
177177
# Shapes are hidden by default, as the JavaScript player would
178178
# make the visible as appropriate.
179-
shape.set('style', shape.get('style').replace('visibility:hidden;', ''))
179+
style = shape.get('style').replace('visibility:hidden;', '')
180180

181181
# Add an SVG <text> fallback to text shapes
182182
switch = shape.find('./{http://www.w3.org/2000/svg}switch')
@@ -198,10 +198,12 @@ def _clean_shape(self, shape):
198198
tspan.text = line
199199
text.append(tspan)
200200

201-
shape.set('style', shape.get('style').replace('color:', 'fill:'))
201+
style += ';fill:currentcolor'
202202
shape.remove(switch)
203203
shape.append(text)
204204

205+
shape.set('style', style)
206+
205207
def add_slides(self, with_annotations):
206208
layer = self._add_layer('Slides')
207209
doc = ET.parse(os.path.join(self.opts.basedir, 'shapes.svg'))

0 commit comments

Comments
 (0)