mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-03 12:03:55 -07:00
Fix Deck Popup Glitchy Rendering (#5204)
- QLabel sizes weren't taken into account until the widget is rendered - Long QLabels can cause exacerbated issues - Force refresh after 1ms to take QLabels into account
This commit is contained in:
parent
17eabf2004
commit
1d8651bc00
1 changed files with 9 additions and 0 deletions
|
|
@ -140,6 +140,15 @@ ZoneViewWidget::ZoneViewWidget(Player *_player,
|
||||||
connect(zone, SIGNAL(optimumRectChanged()), this, SLOT(resizeToZoneContents()));
|
connect(zone, SIGNAL(optimumRectChanged()), this, SLOT(resizeToZoneContents()));
|
||||||
connect(zone, SIGNAL(beingDeleted()), this, SLOT(zoneDeleted()));
|
connect(zone, SIGNAL(beingDeleted()), this, SLOT(zoneDeleted()));
|
||||||
zone->initializeCards(cardList);
|
zone->initializeCards(cardList);
|
||||||
|
|
||||||
|
auto *lastResizeBeforeVisibleTimer = new QTimer(this);
|
||||||
|
connect(lastResizeBeforeVisibleTimer, &QTimer::timeout, this, [=] {
|
||||||
|
resizeToZoneContents();
|
||||||
|
disconnect(lastResizeBeforeVisibleTimer);
|
||||||
|
lastResizeBeforeVisibleTimer->deleteLater();
|
||||||
|
});
|
||||||
|
lastResizeBeforeVisibleTimer->setSingleShot(true);
|
||||||
|
lastResizeBeforeVisibleTimer->start(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZoneViewWidget::processGroupBy(int index)
|
void ZoneViewWidget::processGroupBy(int index)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue