Make overfull airbase display scrollable.

Fixes https://github.com/dcs-liberation/dcs_liberation/issues/2974.
This commit is contained in:
Dan Albert 2023-06-07 21:51:55 -07:00
parent 6640609caf
commit c45ac50370
2 changed files with 10 additions and 1 deletions

View File

@ -4,6 +4,8 @@ Saves from 7.x are not compatible with 8.0.
## Features/Improvements
* **[UI]** Limited size of overfull airbase display and added scrollbar.
## Fixes
# 7.1.0

View File

@ -664,6 +664,8 @@ class OverfullAirbasesDisplay(QGroupBox):
parent: QWidget | None = None,
) -> None:
super().__init__("Overfull airbases", parent)
self.setMaximumHeight(200)
self.parking_tracker = parking_tracker
self.parking_tracker.allocation_changed.connect(self.on_allocation_changed)
@ -671,7 +673,12 @@ class OverfullAirbasesDisplay(QGroupBox):
self.setLayout(layout)
self.label = QLabel()
layout.addWidget(self.label)
scroll = QScrollArea()
scroll.setWidgetResizable(True)
scroll.setWidget(self.label)
scroll.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
layout.addWidget(scroll)
self.on_allocation_changed()