Commit 54a1a286 authored by Matt Lowe's avatar Matt Lowe
Browse files

Added ratio scaling

Previously was adding pixels, rather than using ratios. this was cutting
off cards on higher res screens
parent aad98756
...@@ -120,8 +120,8 @@ void ZoneViewZone::reorganizeCards() ...@@ -120,8 +120,8 @@ void ZoneViewZone::reorganizeCards()
qreal aleft = 0; qreal aleft = 0;
qreal atop = 0; qreal atop = 0;
qreal awidth = (pileView && sortByType) ? qMax(typeColumn + 1, 3) * CARD_WIDTH + 20 : qMax(cols, 1) * CARD_WIDTH + 20; qreal awidth = (pileView && sortByType) ? qMax(typeColumn + 1, 3) * CARD_WIDTH + (CARD_WIDTH/2) : qMax(cols, 1) * CARD_WIDTH + (CARD_WIDTH/2);
qreal aheight = (pileView && sortByType) ? ((longestRow - 1) * CARD_HEIGHT) / 3 + CARD_HEIGHT + 60 : ((rows - 1) * CARD_HEIGHT) / 3 + CARD_HEIGHT + 20; qreal aheight = (pileView && sortByType) ? (longestRow * CARD_HEIGHT) / 3 + CARD_HEIGHT * 1.3 : (rows * CARD_HEIGHT) / 3 + CARD_HEIGHT * 1.3;
optimumRect = QRectF(aleft, atop, awidth, aheight); optimumRect = QRectF(aleft, atop, awidth, aheight);
updateGeometry(); updateGeometry();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment