From e99583d4cca3aaf33bf3b01fa3b14a540a7d3a9b Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 1 Feb 2021 18:13:27 -0500 Subject: [PATCH] Use a standard white background for GTK backends. --- lib/matplotlib/backends/backend_gtk3agg.py | 6 ++---- lib/matplotlib/backends/backend_gtk3cairo.py | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/matplotlib/backends/backend_gtk3agg.py b/lib/matplotlib/backends/backend_gtk3agg.py index ecd15327aa02..889e9347113c 100644 --- a/lib/matplotlib/backends/backend_gtk3agg.py +++ b/lib/matplotlib/backends/backend_gtk3agg.py @@ -23,10 +23,8 @@ def on_draw_event(self, widget, ctx): w, h = allocation.width, allocation.height if not len(self._bbox_queue): - Gtk.render_background( - self.get_style_context(), ctx, - allocation.x, allocation.y, - allocation.width, allocation.height) + ctx.set_source_rgb(1.0, 1.0, 1.0) + ctx.paint() bbox_queue = [transforms.Bbox([[0, 0], [w, h]])] else: bbox_queue = self._bbox_queue diff --git a/lib/matplotlib/backends/backend_gtk3cairo.py b/lib/matplotlib/backends/backend_gtk3cairo.py index af290902d8a6..003fa91b807f 100644 --- a/lib/matplotlib/backends/backend_gtk3cairo.py +++ b/lib/matplotlib/backends/backend_gtk3cairo.py @@ -22,10 +22,8 @@ def on_draw_event(self, widget, ctx): else nullcontext()): self._renderer.set_context(ctx) allocation = self.get_allocation() - Gtk.render_background( - self.get_style_context(), ctx, - allocation.x, allocation.y, - allocation.width, allocation.height) + ctx.set_source_rgb(1.0, 1.0, 1.0) + ctx.paint() self._renderer.set_width_height( allocation.width, allocation.height) self.figure.draw(self._renderer) 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