File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -988,23 +988,24 @@ def create_new_dialog(
988988 if options is not None :
989989 plot_options = plot_options .copy (options )
990990
991+ # Resize the dialog so that it's at least MINDIALOGSIZE (absolute values),
992+ # and at most MAXDIALOGSIZE (% of the main window size):
993+ minwidth , minheight = self .MINDIALOGSIZE
994+ maxwidth = int (self .mainwindow .width () * self .MAXDIALOGSIZE )
995+ maxheight = int (self .mainwindow .height () * self .MAXDIALOGSIZE )
996+ size = min (minwidth , maxwidth ), min (minheight , maxheight )
997+
991998 # pylint: disable=not-callable
992999 dlg = PlotDialog (
9931000 parent = self .parent (),
9941001 title = title ,
9951002 edit = edit ,
9961003 options = plot_options ,
9971004 toolbar = toolbar ,
1005+ size = size ,
9981006 )
9991007 dlg .setWindowIcon (get_icon ("DataLab.svg" ))
10001008
1001- # Resize the dialog so that it's at least MINDIALOGSIZE (absolute values),
1002- # and at most MAXDIALOGSIZE (% of the main window size):
1003- minwidth , minheight = self .MINDIALOGSIZE
1004- maxwidth = int (self .mainwindow .width () * self .MAXDIALOGSIZE )
1005- maxheight = int (self .mainwindow .height () * self .MAXDIALOGSIZE )
1006- dlg .resize (min (minwidth , maxwidth ), min (minheight , maxheight ))
1007-
10081009 if tools is not None :
10091010 for tool in tools :
10101011 dlg .get_manager ().add_tool (tool )
You can’t perform that action at this time.
0 commit comments