Diffstat (limited to 'noncore/multimedia/opieplayer2/mediawidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/multimedia/opieplayer2/mediawidget.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/noncore/multimedia/opieplayer2/mediawidget.cpp b/noncore/multimedia/opieplayer2/mediawidget.cpp index ca84019..62266ad 100644 --- a/noncore/multimedia/opieplayer2/mediawidget.cpp +++ b/noncore/multimedia/opieplayer2/mediawidget.cpp @@ -65,14 +65,20 @@ bool MediaWidget::isOverButton( const QPoint &position, int buttonId ) const return ( position.x() > 0 && position.y() > 0 && position.x() < buttonMask.width() && position.y() < buttonMask.height() && buttonMask.pixelIndex( position.x(), position.y() ) == buttonId + 1 ); } -void MediaWidget::repaintButton( int buttonId ) +void MediaWidget::paintButton( int buttonId ) { QPainter p( this ); paintButton( p, buttonId ); } +void MediaWidget::toggleButton( int buttonId ) +{ + buttons[ buttonId ].isDown = !buttons[ buttonId ].isDown; + paintButton( buttonId ); +} + /* vim: et sw=4 ts=4 */ |