diff --git a/retroshare-gui/src/gui/AboutWidget.cpp b/retroshare-gui/src/gui/AboutWidget.cpp index 46932b33a..f2ef6aac8 100644 --- a/retroshare-gui/src/gui/AboutWidget.cpp +++ b/retroshare-gui/src/gui/AboutWidget.cpp @@ -186,7 +186,7 @@ void AWidget::switchState() if(mState == 1) { - mStep = 1 ; + mStep = 1.0f ; initGoL(); drawBitField(); @@ -237,7 +237,6 @@ void AWidget::initImages() image2 = image1 ; mImagesReady = true ; - initGoL(); drawBitField(); update() ; @@ -258,7 +257,7 @@ void AWidget::initGoL() for(int i=0;i= mMaxStep) + p.fillRect(QRect(i*s+1,j*s+1,s-2,s-2),QBrush(QColor(50,50,50))); + else + p.fillRect(QRect(i*s,j*s,s,s),QBrush(QColor(50,50,50))); p.end(); } @@ -301,7 +303,7 @@ AWidget::AWidget() { density = 5; page = 0; mMaxStep = QFontMetricsF(font()).width(' ') ; - mStep = 1 ; + mStep = 1.0f ; mState = 0 ; mImagesReady = false ; @@ -353,7 +355,7 @@ void AWidget::timerEvent(QTimerEvent* e) else { initGoL(); - mStep++ ; + mStep+=0.2f ; } drawBitField(); @@ -381,12 +383,13 @@ void AWidget::paintEvent(QPaintEvent* e) { QWidget::paintEvent(e); + if(!mImagesReady) initImages(); + switch(mState) { default: case 0: { - if(!mImagesReady) initImages(); QPainter p(this); p.drawImage(0, 0, image1); } diff --git a/retroshare-gui/src/gui/AboutWidget.h b/retroshare-gui/src/gui/AboutWidget.h index 51a056bcd..532170a97 100644 --- a/retroshare-gui/src/gui/AboutWidget.h +++ b/retroshare-gui/src/gui/AboutWidget.h @@ -114,7 +114,7 @@ private: bool mImagesReady ; int mState; int mTimerId; - int mStep; + float mStep; int mMaxStep; };