From 80902b6ade54252e05cf948040a11b2e975f6759 Mon Sep 17 00:00:00 2001 From: simon Date: Mon, 09 Dec 2002 15:10:48 +0000 Subject: - paintButton is no more a duplicated method but centralized in the base class now :) --- (limited to 'noncore/multimedia/opieplayer2/videowidget.cpp') diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp index 3baa087..a483434 100644 --- a/noncore/multimedia/opieplayer2/videowidget.cpp +++ b/noncore/multimedia/opieplayer2/videowidget.cpp @@ -248,17 +248,6 @@ void VideoWidget::setToggleButton( int i, bool down ) { } } -void VideoWidget::paintButton( QPainter &p, int i ) { - - Button &button = buttons[ i ]; - - if ( button.isDown ) { - p.drawPixmap( upperLeftOfButtonMask, button.pixDown ); - } else { - p.drawPixmap( upperLeftOfButtonMask, button.pixUp ); - } -} - void VideoWidget::mouseMoveEvent( QMouseEvent *event ) { for ( unsigned int i = 0; i < buttons.count(); i++ ) { if ( event->state() == QMouseEvent::LeftButton ) { @@ -403,14 +392,14 @@ void VideoWidget::paintEvent( QPaintEvent * pe) { p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() ); p.drawTiledPixmap( pe->rect(), pixBg, pe->rect().topLeft() ); for ( unsigned int i = 0; i < buttons.count(); i++ ) { - paintButton( p, i ); + paintButton( p, buttons[ i ] ); } QPainter p2( this ); p2.drawPixmap( pe->rect().topLeft(), pix ); } else { QPainter p( this ); for ( unsigned int i = 0; i < buttons.count(); i++ ) - paintButton( p, i ); + paintButton( p, buttons[ i ] ); } //slider->repaint( TRUE ); } -- cgit v0.9.0.2