-rw-r--r-- | noncore/tools/clock/clock.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/noncore/tools/clock/clock.cpp b/noncore/tools/clock/clock.cpp index ecbf12f..4d92683 100644 --- a/noncore/tools/clock/clock.cpp +++ b/noncore/tools/clock/clock.cpp @@ -506,32 +506,34 @@ void Clock::timerEvent( QTimerEvent *e ) if ( stop < 120 && bSound ) { Sound::soundAlarm(); stop++; } else { stop = 0; killTimer( e->timerId() ); clearTimer(); setCaption( tr( "Clock: Alarm was missed." ) ); } } AnalogClock::AnalogClock(QWidget * parent, const char * name) : QFrame( parent, name ), clear(true) { + QWidget *d = QApplication::desktop(); + if(d->width() <= 240) bg = Resource::loadPixmap("clock/bg"); } QSizePolicy AnalogClock::sizePolicy() const { return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); } void AnalogClock::drawContents( QPainter *p ) { QRect r = contentsRect(); QRect fr; p->drawPixmap(QPoint(0, 0), bg, r); if ( r. width ( ) > r. height ( )) |