mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-27 00:53:55 -07:00
fix bug where card view window with pile view is too short (#5212)
This commit is contained in:
parent
f634177973
commit
bb84b75db9
1 changed files with 3 additions and 1 deletions
|
|
@ -193,7 +193,9 @@ ZoneViewZone::GridSize ZoneViewZone::positionCardsForDisplay(CardList &cards, Ca
|
||||||
longestRow = qMax(row, longestRow);
|
longestRow = qMax(row, longestRow);
|
||||||
}
|
}
|
||||||
|
|
||||||
return GridSize{longestRow, qMax(col + 1, 3)};
|
// +1 because the row/col variables used in the calculations are 0-indexed but
|
||||||
|
// GridSize expects the actual row/col count
|
||||||
|
return GridSize{longestRow + 1, qMax(col + 1, 3)};
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
int cols = qMin(qFloor(qSqrt((double)cardCount / 2)), 7);
|
int cols = qMin(qFloor(qSqrt((double)cardCount / 2)), 7);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue