Skip to content

Commit

Permalink
Fix small GUI error in create_experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
frode-aarstad committed Jul 4, 2024
1 parent fe09197 commit 153d739
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/ert/gui/ertwidgets/create_experiment_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ def __init__(
QDialog.__init__(self, parent=parent)
self.setModal(True)
self.setWindowTitle(title)
self.setFixedSize(400, 100)
self.setFixedSize(450, 120)

layout = QGridLayout()

experiment_label = QLabel("Experiment name:")
self._experiment_edit = StringBox(
TextModel(""),
placeholder_text="My experiment",
TextModel(""), placeholder_text="My experiment", minimum_width=200
)
self._experiment_edit.setValidator(
NotInStorage(notifier.storage, "experiments")
)

ensemble_label = QLabel("Ensemble name:")
self._ensemble_edit = QLineEdit()
self._ensemble_edit.setMinimumWidth(200)
self._ensemble_edit.setPlaceholderText("My ensemble")

buttons = QDialogButtonBox(
Expand Down
3 changes: 2 additions & 1 deletion src/ert/gui/ertwidgets/stringbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def __init__(
default_string: str = "",
continuous_update: bool = False,
placeholder_text: str = "",
minimum_width: int = 250,
):
"""
:type model: ert.gui.ertwidgets.models.valuemodel.ValueModel
Expand All @@ -31,7 +32,7 @@ def __init__(
:type continuous_update: bool
"""
QLineEdit.__init__(self)
self.setMinimumWidth(250)
self.setMinimumWidth(minimum_width)
self._validation = ValidationSupport(self)
self._validator: Optional[ArgumentDefinition] = None
self._model = model
Expand Down

0 comments on commit 153d739

Please sign in to comment.