8000 Merge pull request #24048 from meeseeksmachine/auto-backport-of-pr-24… · matplotlib/matplotlib@c73f7b1 · GitHub
[go: up one dir, main page]

Skip to content

Commit c73f7b1

Browse files
authored
Merge pull request #24048 from meeseeksmachine/auto-backport-of-pr-24045-on-v3.6.x
Backport PR #24045 on branch v3.6.x (Fix _FigureManagerGTK.resize on GTK4)
2 parents 152df1d + 5f06315 commit c73f7b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/backends/_backend_gtk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,8 +233,8 @@ def resize(self, width, height):
233233
width = int(width / self.canvas.device_pixel_ratio)
234234
height = int(height / self.canvas.device_pixel_ratio)
235235
if self.toolbar:
236-
toolbar_size = self.toolbar.size_request()
237-
height += toolbar_size.height
236+
min_size, nat_size = self.toolbar.get_preferred_size()
237+
height += nat_size.height
238238
canvas_size = self.canvas.get_allocation()
239239
if self._gtk_ver >= 4 or canvas_size.width == canvas_size.height == 1:
240240
# A canvas size of (1, 1) cannot exist in most cases, because

0 commit comments

Comments
 (0)
0