-rw-r--r-- | noncore/games/go/gowidget.cpp | 15 |
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 | |||
@@ -50,4 +50,6 @@ static QPixmap *blackStone; | |||
50 | static QPixmap *whiteStone; | 50 | static QPixmap *whiteStone; |
51 | 51 | ||
52 | static bool smallStones = FALSE; | ||
53 | |||
52 | GoMainWidget::GoMainWidget( QWidget *parent, const char* name) : | 54 | GoMainWidget::GoMainWidget( QWidget *parent, const char* name) : |
53 | QMainWindow( parent, name ) | 55 | QMainWindow( parent, name ) |
@@ -198,4 +200,17 @@ void GoWidget::resizeEvent( QResizeEvent * ) | |||
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 | ||