From 640d964cfdc7467f6cacb513087cd3acda2c04f0 Mon Sep 17 00:00:00 2001 From: kergoth Date: Fri, 07 Jun 2002 18:53:14 +0000 Subject: Backing out unintentional merge from TT branch. --- (limited to 'noncore/games/solitaire/canvasshapes.cpp') 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 @@ -19,11 +19,12 @@ **********************************************************************/ #include #include +#include #include "canvasshapes.h" CanvasRoundRect::CanvasRoundRect(int x, int y, QCanvas *canvas) : - QCanvasRectangle( x, y, 23, 36, canvas) + QCanvasRectangle( x, y, ( qt_screen->deviceWidth() < 200 ) ? 20 : 23, ( qt_screen->deviceWidth() < 200 ) ? 27 : 36, canvas) { setZ(0); show(); @@ -39,7 +40,10 @@ void CanvasRoundRect::redraw() void CanvasRoundRect::drawShape(QPainter &p) { - p.drawRoundRect( (int)x(), (int)y(), 23, 36); + if ( qt_screen->deviceWidth() < 200 ) + p.drawRoundRect( (int)x() + 1, (int)y() + 1, 18, 25); + else + p.drawRoundRect( (int)x(), (int)y(), 23, 36); } @@ -73,20 +77,38 @@ void CanvasCircleOrCross::setCross() void CanvasCircleOrCross::drawShape(QPainter &p) { - int x1 = (int)x(), y1 = (int)y(); - // Green circle - if (circleShape == TRUE) { - p.setPen( QPen( QColor(0x10, 0xE0, 0x10), 1 ) ); - p.drawEllipse( x1 - 1, y1 - 1, 21, 21); - p.drawEllipse( x1 - 1, y1 - 0, 21, 19); - p.drawEllipse( x1 + 0, y1 + 0, 19, 19); - p.drawEllipse( x1 + 1, y1 + 0, 17, 19); - p.drawEllipse( x1 + 1, y1 + 1, 17, 17); - // Red cross + if ( qt_screen->deviceWidth() < 200 ) { + int x1 = (int)x(), y1 = (int)y(); + // Green circle + if (circleShape == TRUE) { + p.setPen( QPen( QColor(0x10, 0xE0, 0x10), 1 ) ); + p.drawEllipse( x1 - 1, y1 - 1, 17, 17); + p.drawEllipse( x1 - 1, y1 - 0, 17, 15); + p.drawEllipse( x1 + 0, y1 + 0, 15, 15); + p.drawEllipse( x1 + 1, y1 + 0, 13, 15); + p.drawEllipse( x1 + 1, y1 + 1, 13, 13); + // Red cross + } else { + p.setPen( QPen( QColor(0xE0, 0x10, 0x10), 4 ) ); + p.drawLine( x1, y1, x1 + 14, y1 + 14); + p.drawLine( x1 + 14, y1, x1, y1 + 14); + } } else { - p.setPen( QPen( QColor(0xE0, 0x10, 0x10), 5 ) ); - p.drawLine( x1, y1, x1 + 20, y1 + 20); - p.drawLine( x1 + 20, y1, x1, y1 + 20); + int x1 = (int)x(), y1 = (int)y(); + // Green circle + if (circleShape == TRUE) { + p.setPen( QPen( QColor(0x10, 0xE0, 0x10), 1 ) ); + p.drawEllipse( x1 - 1, y1 - 1, 21, 21); + p.drawEllipse( x1 - 1, y1 - 0, 21, 19); + p.drawEllipse( x1 + 0, y1 + 0, 19, 19); + p.drawEllipse( x1 + 1, y1 + 0, 17, 19); + p.drawEllipse( x1 + 1, y1 + 1, 17, 17); + // Red cross + } else { + p.setPen( QPen( QColor(0xE0, 0x10, 0x10), 5 ) ); + p.drawLine( x1, y1, x1 + 20, y1 + 20); + p.drawLine( x1 + 20, y1, x1, y1 + 20); + } } } -- cgit v0.9.0.2