mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-18 08:22:15 -07:00
Clamp all DeckPreviewWidget children to the card size on resize.
This commit is contained in:
parent
93d28717e0
commit
aa5acf63e8
1 changed files with 5 additions and 2 deletions
|
|
@ -51,10 +51,13 @@ void DeckPreviewWidget::retranslateUi()
|
|||
void DeckPreviewWidget::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
QWidget::resizeEvent(event);
|
||||
if (bannerCardDisplayWidget == nullptr || bannerCardComboBox == nullptr) {
|
||||
if (bannerCardDisplayWidget == nullptr) {
|
||||
return;
|
||||
}
|
||||
bannerCardComboBox->setMaximumWidth(bannerCardDisplayWidget->width());
|
||||
QList<QWidget *> widgets = findChildren<QWidget *>();
|
||||
for (QWidget *widget : widgets) {
|
||||
widget->setMaximumWidth(bannerCardDisplayWidget->width());
|
||||
}
|
||||
}
|
||||
|
||||
void DeckPreviewWidget::initializeUi(const bool deckLoadSuccess)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue