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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy