summaryrefslogtreecommitdiff
path: root/noncore/games/go/gowidget.cpp
Unidiff
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;
49static QPixmap *blackStone; 49static QPixmap *blackStone;
50static QPixmap *whiteStone; 50static QPixmap *whiteStone;
51 51
52static bool smallStones = FALSE;
53
52GoMainWidget::GoMainWidget( QWidget *parent, const char* name) : 54GoMainWidget::GoMainWidget( QWidget *parent, const char* name) :
53 QMainWindow( parent, name ) 55 QMainWindow( parent, name )
54{ 56{
@@ -197,6 +199,19 @@ void GoWidget::resizeEvent( QResizeEvent * )
197 // int r = (d/2-1); 199 // int r = (d/2-1);
198 bx = (width() - 18*d)/2 ; 200 bx = (width() - 18*d)/2 ;
199 by = (height() - 18*d)/2 ; 201 by = (height() - 18*d)/2 ;
202
203 if ( d < 10 && !smallStones ) {
204 blackStone->convertFromImage( blackStone->convertToImage().smoothScale(8,8) );
205 whiteStone->convertFromImage( whiteStone->convertToImage().smoothScale(8,8) );
206 newBlackStone->convertFromImage( newBlackStone->convertToImage().smoothScale(8,8) );
207
208 smallStones = TRUE;
209 } else if ( d >= 10 && smallStones ) {
210 blackStone = new QPixmap(Resource::loadPixmap( "Go-black" ));
211 whiteStone = new QPixmap(Resource::loadPixmap( "Go-white" ));
212 newBlackStone = new QPixmap(Resource::loadPixmap( "Go-black-highlight" ));
213 smallStones = FALSE;
214 }
200} 215}
201 216
202void GoWidget::init() 217void GoWidget::init()