File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -129,8 +129,7 @@ def __init__(
129129 select_gbox_layout .addWidget (self ._cmap_choice )
130130 select_gbox_layout .addSpacing (10 )
131131 select_gbox_layout .addWidget (new_btn )
132- # Let the new_btn button occupy all the available space:
133- new_btn .setSizePolicy (QW .QSizePolicy .Expanding , QW .QSizePolicy .Expanding )
132+ select_gbox_layout .addStretch (1 )
134133 select_gbox .setLayout (select_gbox_layout )
135134
136135 # Edit the selected colormap
@@ -164,6 +163,9 @@ def __init__(
164163 dialog_layout .addWidget (self .bbox )
165164 self .setLayout (dialog_layout )
166165
166+ # The dialog needs to be resizable horizontally but not vertically:
167+ self .setFixedHeight (self .sizeHint ().height ())
168+
167169 def button_clicked (self , button : QW .QAbstractButton ) -> None :
168170 """Callback function to be called when a button is clicked.
169171
You can’t perform that action at this time.
0 commit comments