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/go/gowidget.cpp') 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() -- cgit v0.9.0.2