Diffstat (limited to 'noncore/tools/clock/clock.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/tools/clock/clock.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/noncore/tools/clock/clock.cpp b/noncore/tools/clock/clock.cpp index 74b7147..41c99a8 100644 --- a/noncore/tools/clock/clock.cpp +++ b/noncore/tools/clock/clock.cpp | |||
@@ -516,6 +516,10 @@ void Clock::timerEvent( QTimerEvent *e ) | |||
516 | } | 516 | } |
517 | } | 517 | } |
518 | 518 | ||
519 | AnalogClock::AnalogClock(QWidget * parent, const char * name) : QFrame( parent, name ), clear(true) | ||
520 | { | ||
521 | bg = Resource::loadPixmap("clock/bg"); | ||
522 | } | ||
519 | 523 | ||
520 | QSizePolicy AnalogClock::sizePolicy() const | 524 | QSizePolicy AnalogClock::sizePolicy() const |
521 | { | 525 | { |
@@ -527,6 +531,8 @@ void AnalogClock::drawContents( QPainter *p ) | |||
527 | QRect r = contentsRect(); | 531 | QRect r = contentsRect(); |
528 | QRect fr; | 532 | QRect fr; |
529 | 533 | ||
534 | p->drawPixmap(QPoint(0, 0), bg, r); | ||
535 | |||
530 | if ( r. width ( ) > r. height ( )) | 536 | if ( r. width ( ) > r. height ( )) |
531 | fr. setRect (( r. width ( ) - r. height ( )) / 2, r. y ( ), r. height ( ), r. height ( )); | 537 | fr. setRect (( r. width ( ) - r. height ( )) / 2, r. y ( ), r. height ( ), r. height ( )); |
532 | else | 538 | else |