mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +00:00
Make loadout/properties tab scrollable.
Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3044.
This commit is contained in:
parent
bb36b8cad3
commit
d54d906593
@ -17,6 +17,7 @@ Saves from 8.0.0 are compatible with 8.1.0
|
|||||||
## Features/Improvements
|
## Features/Improvements
|
||||||
|
|
||||||
* **[Engine]** Support for DCS 2.8.6.41363, including F-15E support.
|
* **[Engine]** Support for DCS 2.8.6.41363, including F-15E support.
|
||||||
|
* **[UI]** Flight loadout/properties tab is now scrollable.
|
||||||
|
|
||||||
## Fixes
|
## Fixes
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,8 @@ from PySide6.QtWidgets import (
|
|||||||
QFrame,
|
QFrame,
|
||||||
QLabel,
|
QLabel,
|
||||||
QVBoxLayout,
|
QVBoxLayout,
|
||||||
|
QScrollArea,
|
||||||
|
QWidget,
|
||||||
)
|
)
|
||||||
|
|
||||||
from game import Game
|
from game import Game
|
||||||
@ -35,6 +37,16 @@ class QFlightPayloadTab(QFrame):
|
|||||||
|
|
||||||
layout = QVBoxLayout()
|
layout = QVBoxLayout()
|
||||||
|
|
||||||
|
scroll_content = QWidget()
|
||||||
|
scrolling_layout = QVBoxLayout()
|
||||||
|
scroll_content.setLayout(scrolling_layout)
|
||||||
|
|
||||||
|
scroll = QScrollArea()
|
||||||
|
scroll.setWidgetResizable(True)
|
||||||
|
scroll.setWidget(scroll_content)
|
||||||
|
scroll.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||||
|
layout.addWidget(scroll)
|
||||||
|
|
||||||
# Docs Link
|
# Docs Link
|
||||||
docsText = QLabel(
|
docsText = QLabel(
|
||||||
'<a href="https://github.com/dcs-liberation/dcs_liberation/wiki/Custom-Loadouts"><span style="color:#FFFFFF;">How to create your own default loadout</span></a>'
|
'<a href="https://github.com/dcs-liberation/dcs_liberation/wiki/Custom-Loadouts"><span style="color:#FFFFFF;">How to create your own default loadout</span></a>'
|
||||||
@ -42,12 +54,12 @@ class QFlightPayloadTab(QFrame):
|
|||||||
docsText.setAlignment(Qt.AlignCenter)
|
docsText.setAlignment(Qt.AlignCenter)
|
||||||
docsText.setOpenExternalLinks(True)
|
docsText.setOpenExternalLinks(True)
|
||||||
|
|
||||||
layout.addLayout(PropertyEditor(self.flight))
|
scrolling_layout.addLayout(PropertyEditor(self.flight))
|
||||||
self.loadout_selector = DcsLoadoutSelector(flight)
|
self.loadout_selector = DcsLoadoutSelector(flight)
|
||||||
self.loadout_selector.currentIndexChanged.connect(self.on_new_loadout)
|
self.loadout_selector.currentIndexChanged.connect(self.on_new_loadout)
|
||||||
layout.addWidget(self.loadout_selector)
|
scrolling_layout.addWidget(self.loadout_selector)
|
||||||
layout.addWidget(self.payload_editor)
|
scrolling_layout.addWidget(self.payload_editor)
|
||||||
layout.addWidget(docsText)
|
scrolling_layout.addWidget(docsText)
|
||||||
|
|
||||||
self.setLayout(layout)
|
self.setLayout(layout)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user