mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Tell Qt that we actually want text to fit.
Why isn't this the default? Fixes https://github.com/dcs-liberation/dcs_liberation/issues/1670
This commit is contained in:
parent
8fe805bc68
commit
5923ba21de
@ -2,27 +2,27 @@ from __future__ import annotations
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import TypeVar, Generic
|
from typing import Generic, TypeVar
|
||||||
|
|
||||||
from PySide2.QtCore import Qt
|
from PySide2.QtCore import Qt
|
||||||
from PySide2.QtWidgets import (
|
from PySide2.QtWidgets import (
|
||||||
|
QApplication,
|
||||||
|
QFrame,
|
||||||
|
QGridLayout,
|
||||||
QGroupBox,
|
QGroupBox,
|
||||||
QHBoxLayout,
|
QHBoxLayout,
|
||||||
QLabel,
|
QLabel,
|
||||||
|
QLayout,
|
||||||
|
QMessageBox,
|
||||||
QPushButton,
|
QPushButton,
|
||||||
QSizePolicy,
|
QSizePolicy,
|
||||||
QSpacerItem,
|
QSpacerItem,
|
||||||
QGridLayout,
|
|
||||||
QApplication,
|
|
||||||
QFrame,
|
|
||||||
QMessageBox,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
from game.dcs.unittype import UnitType
|
from game.purchaseadapter import PurchaseAdapter, TransactionError
|
||||||
from qt_ui.models import GameModel
|
from qt_ui.models import GameModel
|
||||||
from qt_ui.windows.GameUpdateSignal import GameUpdateSignal
|
from qt_ui.windows.GameUpdateSignal import GameUpdateSignal
|
||||||
from qt_ui.windows.QUnitInfoWindow import QUnitInfoWindow
|
from qt_ui.windows.QUnitInfoWindow import QUnitInfoWindow
|
||||||
from game.purchaseadapter import PurchaseAdapter, TransactionError
|
|
||||||
|
|
||||||
|
|
||||||
class RecruitType(Enum):
|
class RecruitType(Enum):
|
||||||
@ -153,6 +153,7 @@ class UnitTransactionFrame(QFrame, Generic[TransactionItemType]):
|
|||||||
exist.setMaximumHeight(72)
|
exist.setMaximumHeight(72)
|
||||||
exist.setMinimumHeight(36)
|
exist.setMinimumHeight(36)
|
||||||
existLayout = QHBoxLayout()
|
existLayout = QHBoxLayout()
|
||||||
|
existLayout.setSizeConstraint(QLayout.SetMinimumSize)
|
||||||
exist.setLayout(existLayout)
|
exist.setLayout(existLayout)
|
||||||
|
|
||||||
existing_units = self.current_quantity_of(item)
|
existing_units = self.current_quantity_of(item)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user