From 2bfd529736f1dcf008540be2199cd3887a53c75c Mon Sep 17 00:00:00 2001 From: harlekin Date: Sat, 05 Apr 2003 14:54:02 +0000 Subject: get the animation right and allways show the busy indicator in the middle of the screen ( in all rotations -) ) --- (limited to 'libopie') diff --git a/libopie/owait.cpp b/libopie/owait.cpp index c7c4445..7ed66eb 100644 --- a/libopie/owait.cpp +++ b/libopie/owait.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include "owait.h" @@ -49,7 +50,7 @@ OWait::OWait(QWidget *parent, const char* msg, bool dispIcon ) } void OWait::timerEvent( QTimerEvent * ) { - frame = (++frame) % 3; + frame = (++frame) % 4; repaint(); } @@ -59,8 +60,10 @@ void OWait::paintEvent( QPaintEvent * ) { } void OWait::show() { + + move( ( ( qApp->desktop()->width() ) / 2 ) - 24, ( ( qApp->desktop()->height() ) / 2 ) - 24 ); startTimer( 300 ); - m_waitTimer->start( m_timerLength * 1000, true ); + m_waitTimer->start( m_timerLength * 1000, true ); QDialog::show(); } -- cgit v0.9.0.2