Diffstat (limited to 'noncore/games/solitaire/canvasshapes.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/games/solitaire/canvasshapes.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/noncore/games/solitaire/canvasshapes.cpp b/noncore/games/solitaire/canvasshapes.cpp index 28d0b4e..6ccd4a4 100644 --- a/noncore/games/solitaire/canvasshapes.cpp +++ b/noncore/games/solitaire/canvasshapes.cpp | |||
@@ -20,9 +20,10 @@ | |||
20 | #include <qpainter.h> | 20 | #include <qpainter.h> |
21 | #include <qcanvas.h> | 21 | #include <qcanvas.h> |
22 | #include <qgfx_qws.h> | ||
22 | #include "canvasshapes.h" | 23 | #include "canvasshapes.h" |
23 | 24 | ||
24 | 25 | ||
25 | CanvasRoundRect::CanvasRoundRect(int x, int y, QCanvas *canvas) : | 26 | CanvasRoundRect::CanvasRoundRect(int x, int y, QCanvas *canvas) : |
26 | QCanvasRectangle( x, y, 23, 36, canvas) | 27 | QCanvasRectangle( x, y, ( qt_screen->deviceWidth() < 200 ) ? 20 : 23, ( qt_screen->deviceWidth() < 200 ) ? 27 : 36, canvas) |
27 | { | 28 | { |
28 | setZ(0); | 29 | setZ(0); |
@@ -40,4 +41,7 @@ void CanvasRoundRect::redraw() | |||
40 | void CanvasRoundRect::drawShape(QPainter &p) | 41 | void CanvasRoundRect::drawShape(QPainter &p) |
41 | { | 42 | { |
43 | if ( qt_screen->deviceWidth() < 200 ) | ||
44 | p.drawRoundRect( (int)x() + 1, (int)y() + 1, 18, 25); | ||
45 | else | ||
42 | p.drawRoundRect( (int)x(), (int)y(), 23, 36); | 46 | p.drawRoundRect( (int)x(), (int)y(), 23, 36); |
43 | } | 47 | } |
@@ -74,4 +78,21 @@ void CanvasCircleOrCross::setCross() | |||
74 | void CanvasCircleOrCross::drawShape(QPainter &p) | 78 | void CanvasCircleOrCross::drawShape(QPainter &p) |
75 | { | 79 | { |
80 | if ( qt_screen->deviceWidth() < 200 ) { | ||
81 | int x1 = (int)x(), y1 = (int)y(); | ||
82 | // Green circle | ||
83 | if (circleShape == TRUE) { | ||
84 | p.setPen( QPen( QColor(0x10, 0xE0, 0x10), 1 ) ); | ||
85 | p.drawEllipse( x1 - 1, y1 - 1, 17, 17); | ||
86 | p.drawEllipse( x1 - 1, y1 - 0, 17, 15); | ||
87 | p.drawEllipse( x1 + 0, y1 + 0, 15, 15); | ||
88 | p.drawEllipse( x1 + 1, y1 + 0, 13, 15); | ||
89 | p.drawEllipse( x1 + 1, y1 + 1, 13, 13); | ||
90 | // Red cross | ||
91 | } else { | ||
92 | p.setPen( QPen( QColor(0xE0, 0x10, 0x10), 4 ) ); | ||
93 | p.drawLine( x1, y1, x1 + 14, y1 + 14); | ||
94 | p.drawLine( x1 + 14, y1, x1, y1 + 14); | ||
95 | } | ||
96 | } else { | ||
76 | int x1 = (int)x(), y1 = (int)y(); | 97 | int x1 = (int)x(), y1 = (int)y(); |
77 | // Green circle | 98 | // Green circle |
@@ -90,3 +111,4 @@ void CanvasCircleOrCross::drawShape(QPainter &p) | |||
90 | } | 111 | } |
91 | } | 112 | } |
113 | } | ||
92 | 114 | ||