Skip to content

Commit f0e0cb6

Browse files
committed
Future-proof dark theme support in wxAgg backend in case svg icons have more complex stroke styles in the future.
1 parent 63f4c2b commit f0e0cb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_wx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,7 @@ def _icon(name):
10701070
fg_lum = (.299 * fg.red + .587 * fg.green + .114 * fg.blue) / 255
10711071
dark = fg_lum - bg_lum > .2
10721072
if dark:
1073-
svg = svg.replace(b'style="fill:black;"', b'style="fill:white;"')
1073+
svg = svg.replace(b'fill:black;', b'fill:white;')
10741074
toolbarIconSize = wx.ArtProvider().GetDIPSizeHint(wx.ART_TOOLBAR)
10751075
return wx.BitmapBundle.FromSVG(svg, toolbarIconSize)
10761076

0 commit comments

Comments
 (0)