From 42a646fd021a2d74b5143120d69d428eede64be2 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 29 Sep 2022 01:21:27 -0400 Subject: [PATCH] Fix _FigureManagerGTK.resize on GTK4 Using the same method as __init__ to avoid the deprecated-in-GTK3 and removed-in-GTK4 API. Closes #24015 --- lib/matplotlib/backends/_backend_gtk.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/backends/_backend_gtk.py b/lib/matplotlib/backends/_backend_gtk.py index a482480ce0c0..db5ca34cbf80 100644 --- a/lib/matplotlib/backends/_backend_gtk.py +++ b/lib/matplotlib/backends/_backend_gtk.py @@ -233,8 +233,8 @@ def resize(self, width, height): width = int(width / self.canvas.device_pixel_ratio) height = int(height / self.canvas.device_pixel_ratio) if self.toolbar: - toolbar_size = self.toolbar.size_request() - height += toolbar_size.height + min_size, nat_size = self.toolbar.get_preferred_size() + height += nat_size.height canvas_size = self.canvas.get_allocation() if self._gtk_ver >= 4 or canvas_size.width == canvas_size.height == 1: # A canvas size of (1, 1) cannot exist in most cases, because 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