mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-20 01:12:15 -07:00
fix after rebase
This commit is contained in:
parent
9f95c731d1
commit
a04887e858
2 changed files with 4 additions and 4 deletions
|
|
@ -281,7 +281,7 @@ static qreal determineNewZoneHeight(qreal oldZoneHeight)
|
||||||
return calcMaxInitialHeight();
|
return calcMaxInitialHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZoneViewWidget::resizeToZoneContents()
|
void ZoneViewWidget::resizeToZoneContents(bool forceInitialHeight)
|
||||||
{
|
{
|
||||||
QRectF zoneRect = zone->getOptimumRect();
|
QRectF zoneRect = zone->getOptimumRect();
|
||||||
qreal totalZoneHeight = zoneRect.height();
|
qreal totalZoneHeight = zoneRect.height();
|
||||||
|
|
@ -292,7 +292,7 @@ void ZoneViewWidget::resizeToZoneContents()
|
||||||
QSizeF maxSize(width, zoneRect.height() + extraHeight + 10);
|
QSizeF maxSize(width, zoneRect.height() + extraHeight + 10);
|
||||||
|
|
||||||
qreal currentZoneHeight = rect().height() - extraHeight - 10;
|
qreal currentZoneHeight = rect().height() - extraHeight - 10;
|
||||||
qreal newZoneHeight = determineNewZoneHeight(currentZoneHeight);
|
qreal newZoneHeight = forceInitialHeight ? calcMaxInitialHeight() : determineNewZoneHeight(currentZoneHeight);
|
||||||
|
|
||||||
QSizeF initialSize(width, newZoneHeight + extraHeight + 10);
|
QSizeF initialSize(width, newZoneHeight + extraHeight + 10);
|
||||||
|
|
||||||
|
|
@ -342,7 +342,7 @@ void ZoneViewWidget::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
|
||||||
if (size().height() < maximumHeight() || size().width() < maximumWidth()) {
|
if (size().height() < maximumHeight() || size().width() < maximumWidth()) {
|
||||||
resize(maximumSize());
|
resize(maximumSize());
|
||||||
} else {
|
} else {
|
||||||
resizeToZoneContents();
|
resizeToZoneContents(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -63,7 +63,7 @@ private slots:
|
||||||
void processGroupBy(int value);
|
void processGroupBy(int value);
|
||||||
void processSortBy(int value);
|
void processSortBy(int value);
|
||||||
void processSetPileView(QT_STATE_CHANGED_T value);
|
void processSetPileView(QT_STATE_CHANGED_T value);
|
||||||
void resizeToZoneContents();
|
void resizeToZoneContents(bool forceInitialHeight = false);
|
||||||
void handleScrollBarChange(int value);
|
void handleScrollBarChange(int value);
|
||||||
void zoneDeleted();
|
void zoneDeleted();
|
||||||
void moveEvent(QGraphicsSceneMoveEvent * /* event */) override;
|
void moveEvent(QGraphicsSceneMoveEvent * /* event */) override;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue