Skip to content

Commit

Permalink
Allow adjustable size for job overview header
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-el committed Jul 4, 2024
1 parent 6be9385 commit c8d52b9
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions src/ert/gui/simulation/run_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@
from queue import SimpleQueue
from typing import Optional

from PyQt5.QtGui import QMouseEvent
from qtpy.QtCore import QModelIndex, QSize, Qt, QThread, QTimer, Signal, Slot
from qtpy.QtGui import QCloseEvent, QKeyEvent, QMovie, QTextCursor, QTextOption
from qtpy.QtGui import (
QCloseEvent,
QKeyEvent,
QMouseEvent,
QMovie,
QTextCursor,
QTextOption,
)
from qtpy.QtWidgets import (
QAbstractItemView,
QDialog,
Expand Down Expand Up @@ -81,7 +87,17 @@ def __init__(self, snapshot_model: SnapshotModel, parent: QWidget | None) -> Non

horizontal_header = self.horizontalHeader()
assert horizontal_header is not None
horizontal_header.setSectionResizeMode(QHeaderView.ResizeMode.Stretch)

for section in range(horizontal_header.count()):
horizontal_header.resizeSection(section, 140)
# Only last section should be stretch
horizontal_header.setSectionResizeMode(
section,
QHeaderView.Stretch
if section == horizontal_header.count() - 1
else QHeaderView.Interactive,
)

vertical_header = self.verticalHeader()
assert vertical_header is not None
vertical_header.setMinimumWidth(20)
Expand Down Expand Up @@ -193,7 +209,6 @@ def __init__(
self._snapshot_model.rowsInserted.connect(self.on_snapshot_new_iteration)

self._job_label = QLabel(self)

self._job_overview = JobOverview(self._snapshot_model, self)

self.running_time = QLabel("")
Expand Down

0 comments on commit c8d52b9

Please sign in to comment.