Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5cf5b23

Browse files
author
Stephen Horst
committed
Propose removing minimum window size limit in tkAgg backend
1 parent 36a7a21 commit 5cf5b23

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

lib/matplotlib/backends/backend_tkagg.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,13 @@ def __init__(self, canvas, num, window):
530530
self.set_window_title("Figure %d" % num)
531531
self.canvas = canvas
532532
self._num = num
533-
_, _, w, h = canvas.figure.bbox.bounds
534-
w, h = int(w), int(h)
535-
self.window.minsize(int(w*3/4),int(h*3/4))
533+
# Minimum size limit on window unnecessary (doesn't crash, just
534+
# opens up the possibility of making really tiny windows), but
535+
# if desired should be set to a hard minimum value rather than a
536+
# sizable percentage of the original dimensions (as implemented
537+
# in v1.4.2 and prior) to allow initially large windows to
538+
# shrink
539+
# self.window.minsize(10, 10)
536540
if matplotlib.rcParams['toolbar']=='toolbar2':
537541
self.toolbar = NavigationToolbar2TkAgg( canvas, self.window )
538542
else:

0 commit comments

Comments
 (0)