mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-21 01:42:15 -07:00
some small formatting stuff
This commit is contained in:
parent
923240e956
commit
0609d24caa
1 changed files with 3 additions and 2 deletions
|
|
@ -163,12 +163,13 @@ ZoneViewZone::GridSize ZoneViewZone::positionCardsForDisplay(CardList &cards, bo
|
||||||
} else {
|
} else {
|
||||||
int cols = qMin(qFloor(qSqrt((double)cardCount / 2)), 7);
|
int cols = qMin(qFloor(qSqrt((double)cardCount / 2)), 7);
|
||||||
int rows = qMax(qCeil((double)cardCount / cols), 1);
|
int rows = qMax(qCeil((double)cardCount / cols), 1);
|
||||||
if (minRows == 0)
|
if (minRows == 0) {
|
||||||
minRows = rows;
|
minRows = rows;
|
||||||
else if (rows < minRows) {
|
} else if (rows < minRows) {
|
||||||
rows = minRows;
|
rows = minRows;
|
||||||
cols = qCeil((double)cardCount / minRows);
|
cols = qCeil((double)cardCount / minRows);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cols < 2)
|
if (cols < 2)
|
||||||
cols = 2;
|
cols = 2;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue