summaryrefslogtreecommitdiff
path: root/noncore/games/go
authorkergoth <kergoth>2002-06-07 18:53:14 (UTC)
committer kergoth <kergoth>2002-06-07 18:53:14 (UTC)
commit640d964cfdc7467f6cacb513087cd3acda2c04f0 (patch) (side-by-side diff)
tree9a784686c1795f8b1f81eb344598f3b549d43467 /noncore/games/go
parentdfb9c76738bb68e235114c5ad43dbd26a59b98ab (diff)
downloadopie-640d964cfdc7467f6cacb513087cd3acda2c04f0.zip
opie-640d964cfdc7467f6cacb513087cd3acda2c04f0.tar.gz
opie-640d964cfdc7467f6cacb513087cd3acda2c04f0.tar.bz2
Backing out unintentional merge from TT branch.
Diffstat (limited to 'noncore/games/go') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/go/gowidget.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/noncore/games/go/gowidget.cpp b/noncore/games/go/gowidget.cpp
index fca9797..8567b30 100644
--- a/noncore/games/go/gowidget.cpp
+++ b/noncore/games/go/gowidget.cpp
@@ -49,6 +49,8 @@ static QPixmap *newBlackStone;
static QPixmap *blackStone;
static QPixmap *whiteStone;
+static bool smallStones = FALSE;
+
GoMainWidget::GoMainWidget( QWidget *parent, const char* name) :
QMainWindow( parent, name )
{
@@ -197,6 +199,19 @@ void GoWidget::resizeEvent( QResizeEvent * )
// int r = (d/2-1);
bx = (width() - 18*d)/2 ;
by = (height() - 18*d)/2 ;
+
+ if ( d < 10 && !smallStones ) {
+ blackStone->convertFromImage( blackStone->convertToImage().smoothScale(8,8) );
+ whiteStone->convertFromImage( whiteStone->convertToImage().smoothScale(8,8) );
+ newBlackStone->convertFromImage( newBlackStone->convertToImage().smoothScale(8,8) );
+
+ smallStones = TRUE;
+ } else if ( d >= 10 && smallStones ) {
+ blackStone = new QPixmap(Resource::loadPixmap( "Go-black" ));
+ whiteStone = new QPixmap(Resource::loadPixmap( "Go-white" ));
+ newBlackStone = new QPixmap(Resource::loadPixmap( "Go-black-highlight" ));
+ smallStones = FALSE;
+ }
}
void GoWidget::init()