Diffstat (limited to 'noncore/games/solitaire/patiencecardgame.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/games/solitaire/patiencecardgame.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/noncore/games/solitaire/patiencecardgame.h b/noncore/games/solitaire/patiencecardgame.h index c4f6c48..0d0e3d5 100644 --- a/noncore/games/solitaire/patiencecardgame.h +++ b/noncore/games/solitaire/patiencecardgame.h | |||
@@ -22,12 +22,13 @@ | |||
22 | 22 | ||
23 | 23 | ||
24 | #include <qpopupmenu.h> | 24 | #include <qpopupmenu.h> |
25 | #include <qmainwindow.h> | 25 | #include <qmainwindow.h> |
26 | #include <qintdict.h> | 26 | #include <qintdict.h> |
27 | #include <qcanvas.h> | 27 | #include <qcanvas.h> |
28 | #include <qgfx_qws.h> | ||
28 | // #include "canvascardshapes.h" | 29 | // #include "canvascardshapes.h" |
29 | // #include "canvascard.h" | 30 | // #include "canvascard.h" |
30 | #include "canvascardgame.h" | 31 | #include "canvascardgame.h" |
31 | 32 | ||
32 | 33 | ||
33 | class PatienceFaceDownDeck : public CardPile, public CanvasRoundRect | 34 | class PatienceFaceDownDeck : public CardPile, public CanvasRoundRect |
@@ -127,28 +128,30 @@ public: | |||
127 | setNextX( pileX ); | 128 | setNextX( pileX ); |
128 | setNextY( pileY ); | 129 | setNextY( pileY ); |
129 | return; | 130 | return; |
130 | } else { | 131 | } else { |
131 | top = getCardPos(NULL); | 132 | top = getCardPos(NULL); |
132 | if ( newTopCard->isFacing() == FALSE ) { | 133 | if ( newTopCard->isFacing() == FALSE ) { |
134 | int offsetDown = ( qt_screen->deviceWidth() < 200 ) ? 9 : 13; | ||
133 | // correct the position taking in to account the card is not | 135 | // correct the position taking in to account the card is not |
134 | // yet flipped, but will become flipped | 136 | // yet flipped, but will become flipped |
135 | top = QPoint( top.x() - 1, top.y() - 3 ); | 137 | top = QPoint( top.x() - 1, top.y() - 3 ); |
136 | newTopCard->flipTo( top.x(), top.y() ); | 138 | newTopCard->flipTo( top.x(), top.y() ); |
137 | top = QPoint( top.x(), top.y() + 13 ); | 139 | top = QPoint( top.x(), top.y() + offsetDown ); |
138 | } | 140 | } |
139 | setNextX( top.x() ); | 141 | setNextX( top.x() ); |
140 | setNextY( top.y() ); | 142 | setNextY( top.y() ); |
141 | } | 143 | } |
142 | } | 144 | } |
143 | virtual QPoint getCardPos(Card *c) { | 145 | virtual QPoint getCardPos(Card *c) { |
144 | int x = pileX, y = pileY; | 146 | int x = pileX, y = pileY; |
145 | Card *card = cardOnBottom(); | 147 | Card *card = cardOnBottom(); |
146 | while ((card != c) && (card != NULL)) { | 148 | while ((card != c) && (card != NULL)) { |
147 | if (card->isFacing()) { | 149 | if (card->isFacing()) { |
148 | y += 13; | 150 | int offsetDown = ( qt_screen->deviceWidth() < 200 ) ? 9 : 13; |
151 | y += offsetDown; | ||
149 | } else { | 152 | } else { |
150 | x += 1; | 153 | x += 1; |
151 | y += 3; | 154 | y += 3; |
152 | } | 155 | } |
153 | card = cardInfront(card); | 156 | card = cardInfront(card); |
154 | } | 157 | } |