summaryrefslogtreecommitdiff
path: root/noncore/games/go/gowidget.cpp
Side-by-side diff
Diffstat (limited to 'noncore/games/go/gowidget.cpp') (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()