mirror of
https://github.com/dcs-liberation/dcs_liberation.git
synced 2025-11-10 14:22:26 +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 (cherry picked from commit 5923ba21de84932c1980235714893148900ee371)
This commit is contained in:
parent
c1f194b3d5
commit
6a3ff8d6ac
@ -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