We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 506efe5 + ed324fc commit f8ffce6Copy full SHA for f8ffce6
lib/matplotlib/backends/backend_gtk4.py
@@ -74,7 +74,11 @@ def __init__(self, figure=None):
74
self.set_focusable(True)
75
76
css = Gtk.CssProvider()
77
- css.load_from_data(b".matplotlib-canvas { background-color: white; }")
+ style = '.matplotlib-canvas { background-color: white; }'
78
+ if Gtk.check_version(4, 9, 3) is None:
79
+ css.load_from_data(style, -1)
80
+ else:
81
+ css.load_from_data(style.encode('utf-8'))
82
style_ctx = self.get_style_context()
83
style_ctx.add_provider(css, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION)
84
style_ctx.add_class("matplotlib-canvas")
0 commit comments