Skip to content

Commit e69a56c

Browse files
committed
Colormap manager: fixed widget resize issues
1 parent d6eb8e0 commit e69a56c

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

plotpy/widgets/colormap/manager.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)